GetPlayerVoiceEnabled
Jump to navigation
Jump to search
getPlayerVoiceEnabled
Checks whether voice transmission is enabled for a connected player.
Syntax
bool getPlayerVoiceEnabled(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns true when voice is enabled; otherwise returns false.
Examples
Check the voice policy:
if getPlayerVoiceEnabled(playerId) then
outputDebugString("Voice enabled")
end
Notes
- Available only in server-side resource scripts.
- Voice policy is server-authoritative and is replayed to late joiners.