GetPlayerVoiceChannel
getPlayerVoiceChannel
Returns the player's authoritative voice channel identifier.
Syntax
int|false getPlayerVoiceChannel(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns the non-negative channel identifier, or false for an invalid player.
Examples
Read a radio channel:
local channel = getPlayerVoiceChannel(playerId)
if channel then
outputDebugString(tostring(channel))
end
Notes
- Available only in server-side resource scripts.
- The channel is used for routing when voice mode is
channel.