setPlayerDeafInVoiceChannel
Server
Deafens a player in a voice channel: the others still hear them, but they hear nobody through that channel.
bool setPlayerDeafInVoiceChannel(element channel, player player, bool deaf)
Parameters
| Name | Type | Description |
|---|---|---|
| channel | element | The channel, from createVoiceChannel. |
| player | player | The player. |
| deaf | bool | true to deafen, false to hear again. |
Returns
true if it was changed, false if the player is not in the channel.
Example
local radio = createVoiceChannel(0, 0)
addCommandHandler("radiooff", function(player)
setPlayerDeafInVoiceChannel(radio, player, true)
end)