removePlayerFromVoiceChannel
Server
Takes a player out of a voice channel.
bool removePlayerFromVoiceChannel(element channel, player player)
Parameters
| Name | Type | Description |
|---|---|---|
| channel | element | The channel, from createVoiceChannel. |
| player | player | The 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)