setPlayerMutedInVoiceChannel
Server
Mutes a player in a voice channel: they still hear the channel, but nobody hears them through it.
bool setPlayerMutedInVoiceChannel(element channel, player player, bool muted)
Parameters
| Name | Type | Description |
|---|---|---|
| channel | element | The channel, from createVoiceChannel. |
| player | player | The player. |
| muted | bool | true to mute, false to be heard again. |
Returns
true if it was changed, false if the player is not in the channel.
Example
local lobby = createVoiceChannel(0, 0)
addCommandHandler("mute", function(admin, command, name)
local target = getPlayerFromName(name)
if target then
setPlayerMutedInVoiceChannel(lobby, target, true)
end
end)