M MY Multiplayer: Wiki
Side
Kind

removePlayerFromVoiceChannel

Server

Takes a player out of a voice channel.

bool removePlayerFromVoiceChannel(element channel, player player)

Parameters

NameTypeDescription
channelelementThe channel, from createVoiceChannel.
playerplayerThe player.

Returns

true if they were taken out, false if the player was not in the channel.

A channel created in mode 3 is destroyed when the last player leaves. A player who leaves the server leaves every channel.

Example

local team = createVoiceChannel(0, 0)

addCommandHandler("leaveteam", function(player)
    removePlayerFromVoiceChannel(team, player)
end)

See also