public static void Help(List <string> _params, ClientInfo _cInfo) { if (API.Permissions.isAllowed(_cInfo, "chatcommand.help")) { SDTM.PlayerUtils.SendChatMessageAs(_cInfo, "Help:", "Server"); Dictionary <string, ChatCommand> commands = API.Instance._chatCommands; foreach (KeyValuePair <string, ChatCommand> command in commands) { if (API.Permissions.isAllowed(_cInfo, command.Value.GetPermissionNode())) { SDTM.PlayerUtils.SendChatMessageAs(_cInfo, COLORS.AQUA + "!" + command.Key + COLORS.DEFAULT + " - " + command.Value.GetDescription(), COLORS.ColorModName("Help")); } } } else { SDTM.PlayerUtils.SendChatMessageAs(_cInfo, COLORS.ColorError(CommandUtils.MSG.DENIED), COLORS.ColorModName("Server")); } }
private void SetupTeams(int teamCount) { string skinName = Constants.cTeamSkinName [0]; List <string> TeamNames = new List <string>(); List <string> TeamSkins = new List <string> (); List <Color> TeamColors = new List <Color> (); for (int i = 0; i <= teamCount; i++) { TeamNames.Add(TEAMNAMES[i]); TeamSkins.Add(skinName); TeamColors.Add(COLORS.HexToColor(TEAMCOLORS[i])); } Constants.cTeamName = TeamNames.ToArray(); Constants.cTeamSkinName = TeamSkins.ToArray(); Constants.cTeamColors = TeamColors.ToArray(); Constants.cNumberOfTeams = teamCount + 1; SdtdConsole.Instance.Output("Team Count Set"); }