public Gametype[] getAvailableGametypes() { Gametype[] gametypes = new Gametype[21]; gametypes[0] = new Gametype("dm", "Deathmatch"); gametypes[1] = new Gametype("war", "Team Deathmatch"); gametypes[2] = new Gametype("koth", "Headquarters"); gametypes[3] = new Gametype("ctf", "Capture The Flag"); gametypes[4] = new Gametype("dd", "Demolition"); gametypes[5] = new Gametype("dom", "Domination"); gametypes[6] = new Gametype("sab", "Sabotage"); gametypes[7] = new Gametype("sd", "Search & Destroy"); gametypes[8] = new Gametype("vip", "Very Important Person"); gametypes[9] = new Gametype("gtnw", "Global Thermonuclear War"); gametypes[10] = new Gametype("oitc", "One In The Chamber"); gametypes[11] = new Gametype("arena", "Arena"); gametypes[12] = new Gametype("dzone", "Drop Zone"); gametypes[13] = new Gametype("gg", "Gun Game"); gametypes[14] = new Gametype("snipe", "Sniping"); gametypes[15] = new Gametype("ss", "Sharp Shooter"); gametypes[16] = new Gametype("m40a3", "M40A3"); gametypes[17] = new Gametype("fo", "Face Off"); gametypes[18] = new Gametype("dmc", "Deathmatch Classic"); gametypes[19] = new Gametype("killcon", "Kill Confirmed"); gametypes[20] = new Gametype("oneflag", "One Flag CTF"); return(gametypes); }
public Gametype[] getAvailableGametypes() { Gametype[] gametypes = new Gametype[21]; gametypes[0] = new Gametype("dm", "Deathmatch"); gametypes[1] = new Gametype("war", "Team Deathmatch"); gametypes[2] = new Gametype("koth", "Headquarters"); gametypes[3] = new Gametype("ctf", "Capture The Flag"); gametypes[4] = new Gametype("dd", "Demolition"); gametypes[5] = new Gametype("dom", "Domination"); gametypes[6] = new Gametype("sab", "Sabotage"); gametypes[7] = new Gametype("sd", "Search & Destroy"); gametypes[8] = new Gametype("vip", "Very Important Person"); gametypes[9] = new Gametype("gtnw", "Global Thermonuclear War"); gametypes[10] = new Gametype("oitc", "One In The Chamber"); gametypes[11] = new Gametype("arena", "Arena"); gametypes[12] = new Gametype("dzone", "Drop Zone"); gametypes[13] = new Gametype("gg", "Gun Game"); gametypes[14] = new Gametype("snipe", "Sniping"); gametypes[15] = new Gametype("ss", "Sharp Shooter"); gametypes[16] = new Gametype("m40a3", "M40A3"); gametypes[17] = new Gametype("fo", "Face Off"); gametypes[18] = new Gametype("dmc", "Deathmatch Classic"); gametypes[19] = new Gametype("killcon", "Kill Confirmed"); gametypes[20] = new Gametype("oneflag", "One Flag CTF"); return gametypes; }
private void setSettingsButton_Click(object sender, EventArgs e) { if (currentServer == null) { return; } List <String> rconCommands = new List <String>(); String newMap = String.Empty; if (timeLimitBox.Text.Length > 0) { int timeLimit = -1; if (Int32.TryParse(timeLimitBox.Text, out timeLimit)) { rconCommands.Add("scr_" + currentServer.Gametype + "_timelimit " + timeLimit); } else { updateConsoleOutput("Ignoring invalid entry \"{0}\" for timelimit", timeLimitBox.Text); } } if (modBox.Text.Length > 0) { rconCommands.Add("fs_game \"mods/" + modBox.Text + "\""); } if (passwordBox.Text.Length > 0) { rconCommands.Add("g_password \"" + passwordBox.Text + "\""); } if (gametypeSelectionBox.SelectedItem != null) { Gametype Selected = (Gametype)gametypeSelectionBox.SelectedItem; rconCommands.Add("g_gametype \"" + Selected.Name + "\""); } if (mapSelectionBox.SelectedItem != null) { Map desiredMap = (Map)mapSelectionBox.SelectedItem; newMap = desiredMap.Name; } if (ffCheckBox.Checked) { rconCommands.Add("scr_team_fftype 2"); } else { rconCommands.Add("scr_team_fftype 0"); } if (hardcoreCheckBox.Checked) { rconCommands.Add("g_hardcore 1"); } else { rconCommands.Add("g_hardcore 0"); } foreach (String Command in rconCommands) { RCON_Response Request = currentServer.Console.rconQuery(Command); queryUserFeedback(Request); } if (newMap == String.Empty) { currentServer.Console.rconQuery("fast_restart"); } else { currentServer.Console.rconQuery("map \"" + newMap + "\""); } updateConsoleOutput("Finished applying game settings."); }