{
case CMD_REQUEST_COMMAND:
{
- self.autoswitch = InterpretBoolean(argv(1));
- sprint(self, strcat("^1autoswitch is currently turned ", (self.autoswitch ? "on" : "off"), ".\n"));
- return; // never fall through to usage
+ if(argv(1) != "")
+ {
+ self.autoswitch = InterpretBoolean(argv(1));
+ sprint(self, strcat("^1autoswitch is currently turned ", (self.autoswitch ? "on" : "off"), ".\n"));
+ return;
+ }
}
default:
+ sprint(self, "Incorrect parameters for ^2autoswitch^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
}
default:
+ sprint(self, "Incorrect parameters for ^2checkfail^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd checkfail <message>\n");
{
case CMD_REQUEST_COMMAND:
{
- if(self.flags & FL_CLIENT)
+ if(argv(1) != "")
{
- self.version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
-
- if(self.version < autocvar_gameversion_min || self.version > autocvar_gameversion_max)
- {
- self.version_mismatch = 1;
- ClientKill_TeamChange(-2); // observe
- }
- else if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force)
+ if(self.flags & FL_CLIENT)
{
- //JoinBestTeam(self, FALSE, TRUE);
- }
- else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0))
- {
- self.classname = "observer"; // really?
- stuffcmd(self, "menu_showteamselect\n");
+ self.version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
+
+ if(self.version < autocvar_gameversion_min || self.version > autocvar_gameversion_max)
+ {
+ self.version_mismatch = 1;
+ ClientKill_TeamChange(-2); // observe
+ }
+ else if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force)
+ {
+ //JoinBestTeam(self, FALSE, TRUE);
+ }
+ else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0))
+ {
+ self.classname = "observer"; // really?
+ stuffcmd(self, "menu_showteamselect\n");
+ }
}
+
+ return;
}
- return; // never fall through to usage
}
default:
+ sprint(self, "Incorrect parameters for ^2clientversion^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd clientversion version\n");
{
case CMD_REQUEST_COMMAND:
{
- if(intermission_running)
- MapVote_SendPicture(stof(argv(1)));
+ if(argv(1) != "")
+ {
+ if(intermission_running)
+ MapVote_SendPicture(stof(argv(1)));
- return; // never fall through to usage
+ return;
+ }
}
default:
+ sprint(self, "Incorrect parameters for ^2getmapvotepic^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd getmapvotepic mapid\n");
{
case CMD_REQUEST_COMMAND:
{
- float tokens;
- string s;
-
- if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
+ if(argv(1) != "")
{
- s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
- tokens = tokenize_console(s);
+ float tokens;
+ string s;
+
+ if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
+ {
+ s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
+ tokens = tokenize_console(s);
+ }
+
+ GetCvars(1);
+
+ return;
}
- GetCvars(1);
- return; // never fall through to usage
}
default:
+ sprint(self, "Incorrect parameters for ^2reportcvar^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd reportcvar <cvar>\n");
{
case CMD_REQUEST_COMMAND:
{
- float selection;
-
- if (self.flags & FL_CLIENT)
+ if(argv(1) != "")
{
- if(teamplay)
- if not(self.team_forced > 0)
- if not(lockteams)
- {
- switch(argv(1))
+ if(self.flags & FL_CLIENT)
+ {
+ if(teamplay)
+ if not(self.team_forced > 0)
+ if not(lockteams)
{
- case "red": selection = COLOR_TEAM1; break;
- case "blue": selection = COLOR_TEAM2; break;
- case "yellow": selection = COLOR_TEAM3; break;
- case "pink": selection = COLOR_TEAM4; break;
- case "auto": selection = (-1); break;
+ float selection;
- default: break;
- }
-
- if(selection)
- {
- if(self.team == selection && self.deadflag == DEAD_NO)
- sprint(self, "^7You already are on that team.\n");
- else if(self.wasplayer && autocvar_g_changeteam_banned)
- sprint(self, "^1You cannot change team, forbidden by the server.\n");
- else
- ClientKill_TeamChange(selection);
+ switch(argv(1))
+ {
+ case "red": selection = COLOR_TEAM1; break;
+ case "blue": selection = COLOR_TEAM2; break;
+ case "yellow": selection = COLOR_TEAM3; break;
+ case "pink": selection = COLOR_TEAM4; break;
+ case "auto": selection = (-1); break;
+
+ default: break;
+ }
+
+ if(selection)
+ {
+ if(self.team == selection && self.deadflag == DEAD_NO)
+ sprint(self, "^7You already are on that team.\n");
+ else if(self.wasplayer && autocvar_g_changeteam_banned)
+ sprint(self, "^1You cannot change team, forbidden by the server.\n");
+ else
+ ClientKill_TeamChange(selection);
+ }
}
- }
+ else
+ sprint(self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
else
- sprint(self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
+ sprint(self, "^7selectteam can not be used as your team is forced\n");
else
- sprint(self, "^7selectteam can not be used as your team is forced\n");
- else
- sprint(self, "^7selectteam can only be used in teamgames\n");
+ sprint(self, "^7selectteam can only be used in teamgames\n");
+ }
+ return;
}
- return; // never fall through to usage
}
default:
+ sprint(self, "Incorrect parameters for ^2selectteam^7\n");
case CMD_REQUEST_USAGE:
{
- //sprint(self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
sprint(self, "\nUsage:^3 cmd selectteam team\n");
sprint(self, " Where 'team' is the prefered team to try and join.\n");
sprint(self, " Full list of options here: \"red, blue, yellow, pink, auto\"\n");
{
case CMD_REQUEST_COMMAND:
{
- stuffcmd(self, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
- return; // never fall through to usage
+ if(argv(1) != "")
+ {
+ stuffcmd(self, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
+ return;
+ }
}
default:
+ sprint(self, "Incorrect parameters for ^2selectteam^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd selfstuff <command>\n");
{
case CMD_REQUEST_COMMAND:
{
- float tokens;
- string s;
-
- if(argc == 2) // undefined cvar: use the default value on the server then
+ if(argv(1) != "")
{
- s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
- tokens = tokenize_console(s);
+ float tokens;
+ string s;
+
+ if(argc == 2) // undefined cvar: use the default value on the server then
+ {
+ s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
+ tokens = tokenize_console(s);
+ }
+
+ GetCvars(1);
+
+ return;
}
- GetCvars(1);
- return; // never fall through to usage
}
default:
+ sprint(self, "Incorrect parameters for ^2sentcvar^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd sentcvar <cvar>\n");
{
case CMD_REQUEST_COMMAND:
{
- sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
- return; // never fall through to usage
+ if(argv(1) != "")
+ {
+ sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
+ return;
+ }
}
default:
+ sprint(self, "Incorrect parameters for ^2suggestmap^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd suggestmap map\n");
{
case CMD_REQUEST_COMMAND:
{
- if(argc >= 3)
- VoiceMessage(argv(1), substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
- else
- VoiceMessage(argv(1), "");
- return; // never fall through to usage
+ if(argv(1) != "")
+ {
+ if(argc >= 3)
+ VoiceMessage(argv(1), substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
+ else
+ VoiceMessage(argv(1), "");
+
+ return;
+ }
}
default:
+ sprint(self, "Incorrect parameters for ^2voice^7\n");
case CMD_REQUEST_USAGE:
{
sprint(self, "\nUsage:^3 cmd voice messagetype <soundname>\n");