コード例 #1
0
 private void UnreadyCommandChat(BasePlayer player, string command, string[] args)
 {
     if (GameStarted)
     {
         return;
     }
     if (RedReady.Contains(player.userID))
     {
         RedReady.Remove(player.userID);
         BasePlayer.activePlayerList.ForEach(x => SendChatMessage(x, CurrentUnready, player.displayName));
     }
     else if (BlueReady.Contains(player.userID))
     {
         BlueReady.Remove(player.userID);
         BasePlayer.activePlayerList.ForEach(x => SendChatMessage(x, CurrentUnready, player.displayName));
     }
 }
コード例 #2
0
 private void JoinBlue(BasePlayer player)
 {
     if (BlueTeam.Count == TeamSize)
     {
         SendChatMessage(player, CurrentTeamFull);
         return;
     }
     if (RedTeam.Contains(player.userID))
     {
         RedTeam.Remove(player.userID);
         RedReady.Remove(player.userID);
         RedParty.RemovePlayer(player.userID);
     }
     if (!BlueTeam.Contains(player.userID))
     {
         BlueTeam.Add(player.userID);
         BlueParty.AddPlayer(player);
     }
     BasePlayer.activePlayerList.ForEach(x => SendChatMessage(x, CurrentNow, player.displayName, CurrentBlueLower));
 }