예제 #1
0
        public void OnRemovePlayer(int voiceid, IPlayer player)
        {
            voiceid += 999;
            TempVoice voice = GetVoiceChannelById(voiceid);

            if (voice != null)
            {
                voice.RemovePlayer(player);
            }
        }
예제 #2
0
        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);
            }
        }