M MY Multiplayer: Wiki
Side
Kind

addPlayerToVoiceChannel

Server

Puts a player in a voice channel. From then on they hear and are heard by the others in the channel.

bool addPlayerToVoiceChannel(element channel, player player)

Parameters

NameTypeDescription
channelelementThe channel, from createVoiceChannel.
playerplayerThe player.

Returns

true.

Example

local team = createVoiceChannel(0, 0)

addCommandHandler("jointeam", function(player)
    addPlayerToVoiceChannel(team, player)
end)
NoteAdding a player who is already in the channel again clears their mute and deafness in that channel.

See also