private void ReadyCommandChat(BasePlayer player, string command, string[] args) { if (GameStarted) { return; } if (RedTeam.Contains(player.userID) && !RedReady.Contains(player.userID)) { RedReady.Add(player.userID); BasePlayer.activePlayerList.ForEach(x => SendChatMessage(x, CurrentReady, player.displayName)); } else if (BlueTeam.Contains(player.userID) && !BlueReady.Contains(player.userID)) { BlueReady.Add(player.userID); BasePlayer.activePlayerList.ForEach(x => SendChatMessage(x, CurrentReady, player.displayName)); } else if (!RedTeam.Contains(player.userID) && !BlueReady.Contains(player.userID)) { SendChatMessage(player, CurrentChoose); } if (RedReady.Count == TeamSize && BlueReady.Count == TeamSize) { BeginGame(); } }
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)); } }