IsPlayerVoiceChannel
From Onset Developer Wiki
Description
Tests if a player is in a voice channel. Use SetPlayerVoiceChannel to set them.
Syntax
IsPlayerVoiceChannel(player, channel)
Parameters
- player
The player identifier. - channel
The channel id as an integer.
Return Value
- This function returns true if a player is in the voice channel.
Example
function cmd_isvc(player, channel)
local IsInChannel = IsPlayerVoiceChannel(player, channel)
AddPlayerChat(player, "You are in the channel "..channel..": "..tostring(IsInChannel))
end
AddCommand("isvc", cmd_isvc)