Esempio n. 1
0
 private void OnPlayerDisconnect(IPlayer player, string reason)
 {
     MainNormalVoiceChannel.RemovePlayer(player);
     MainWhisperVoiceChannel.RemovePlayer(player);
     MainShoutVoiceChannel.RemovePlayer(player);
     PoliceMegaphoneVoiceChannel.RemovePlayer(player);
 }
Esempio n. 2
0
        private void OnPlayerConnect(ServerPlayer player, string reason)
        {
            MainNormalVoiceChannel.AddPlayer(player);

            MainWhisperVoiceChannel.AddPlayer(player);
            MainWhisperVoiceChannel.MutePlayer(player);

            MainShoutVoiceChannel.AddPlayer(player);
            MainShoutVoiceChannel.MutePlayer(player);

            PoliceMegaphoneVoiceChannel.AddPlayer(player);
            PoliceMegaphoneVoiceChannel.MutePlayer(player);

            player.VoiceLevel = PlayerVoiceLevel.Normal;
        }
Esempio n. 3
0
        public void ChangeVoiceLevel(ServerPlayer player, PlayerVoiceLevel newLevel)
        {
            switch (newLevel)
            {
            case PlayerVoiceLevel.Mute:
                MainWhisperVoiceChannel.MutePlayer(player);
                MainNormalVoiceChannel.MutePlayer(player);
                MainShoutVoiceChannel.MutePlayer(player);
                PoliceMegaphoneVoiceChannel.MutePlayer(player);
                break;

            case PlayerVoiceLevel.Whisper:
                MainWhisperVoiceChannel.UnmutePlayer(player);
                MainNormalVoiceChannel.MutePlayer(player);
                MainShoutVoiceChannel.MutePlayer(player);
                PoliceMegaphoneVoiceChannel.MutePlayer(player);
                break;

            case PlayerVoiceLevel.Normal:
                MainWhisperVoiceChannel.MutePlayer(player);
                MainNormalVoiceChannel.UnmutePlayer(player);
                MainShoutVoiceChannel.MutePlayer(player);
                PoliceMegaphoneVoiceChannel.MutePlayer(player);
                break;

            case PlayerVoiceLevel.Shout:
                MainWhisperVoiceChannel.MutePlayer(player);
                MainNormalVoiceChannel.MutePlayer(player);
                MainShoutVoiceChannel.UnmutePlayer(player);
                PoliceMegaphoneVoiceChannel.MutePlayer(player);
                break;

            case PlayerVoiceLevel.PoliceMegaphone:
                MainWhisperVoiceChannel.MutePlayer(player);
                MainNormalVoiceChannel.MutePlayer(player);
                MainShoutVoiceChannel.MutePlayer(player);
                PoliceMegaphoneVoiceChannel.UnmutePlayer(player);
                break;
            }

            player.VoiceLevel = newLevel;
        }