M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
channelelementThe channel, from createVoiceChannel.
playerplayerThe player.
deafbooltrue 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)

See also