setPlayerMutedInVoiceChannel
Servidor
Deixa um jogador mudo num canal de voz: ele continua ouvindo o canal, mas ninguém o ouve por ele.
bool setPlayerMutedInVoiceChannel(element channel, player player, bool muted)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
| channel | element | O canal, de createVoiceChannel. |
| player | player | O jogador. |
| muted | bool | true para silenciar, false para voltar a ser ouvido. |
Retorno
true se mudou, false se o jogador não está no canal.
Exemplo
local lobby = createVoiceChannel(0, 0)
addCommandHandler("mute", function(admin, command, name)
local target = getPlayerFromName(name)
if target then
setPlayerMutedInVoiceChannel(lobby, target, true)
end
end)