IsPlayerVoiceEnabled: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|IsPlayerVoiceEnabled(player)}} {{FuncParameters}} {{FuncParam|player|__EDIT_ME__}} {{FuncReturnVa..."
 
28days (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Check if the specified player has voice chat enabled or not.}}


{{FuncSyntax|IsPlayerVoiceEnabled(player)}}
{{FuncSyntax|IsPlayerVoiceEnabled(playerid)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|__EDIT_ME__}}
{{FuncParam|playerid|The player identifier.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns '''true''' on success.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
if IsPlayerVoiceEnabled(playerid) then
    AddPlayerChat(playerid, "You have voice chat enabled.")
end
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:VoiceFunctions}}

Latest revision as of 06:04, 23 November 2019

IsPlayerVoiceEnabled

Type: Function
Context: Server
Introduced: v1.0

Description

Check if the specified player has voice chat enabled or not.

Syntax

IsPlayerVoiceEnabled(playerid)

Parameters

  • playerid
    The player identifier.

Return Value

  • Returns true on success.

Example

if IsPlayerVoiceEnabled(playerid) then
    AddPlayerChat(playerid, "You have voice chat enabled.")
end

See also