public void OnRemovePlayer(int voiceid, IPlayer player) { voiceid += 999; TempVoice voice = GetVoiceChannelById(voiceid); if (voice != null) { voice.RemovePlayer(player); } }
public void OnPlayersDisconnect(IPlayer player, string reason) { TempVoice removed = null; foreach (TempVoice voice in VoiceChannels) { if (voice.Players.Contains(player)) { removed = voice; } } if (removed != null) { removed.RemovePlayer(player); } }