49 if (from_db_too && ignore.crypto_idfp && ignore.crypto_idfp !=
"" &&
this.crypto_idfp &&
this.crypto_idfp !=
"")
54 if(pos == ignore.crypto_idfp)
72 newlist =
cons(newlist, it););
92 if (to_db_too && ignore.crypto_idfp && ignore.crypto_idfp !=
"" &&
this.crypto_idfp &&
this.crypto_idfp !=
"")
125 thelist =
cons(thelist, pos);
128 return ((thelist !=
"") ?
PlayerInList(pl, thelist) :
false);
186 if(pos == it.crypto_idfp)
210 sprint(caller,
strcat(
"^1autoswitch is currently turned ", (
CS_CVAR(caller).cvar_cl_autoswitch ?
"on" :
"off"),
".\n"));
216 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
219 sprint(caller,
"\nUsage:^3 cmd autoswitch <selection>\n");
220 sprint(caller,
" Where <selection> controls if autoswitch is on or off.\n");
232 if(!(caller.crypto_idfp && caller.crypto_idfp !=
""))
234 sprint(caller,
"You don't have a stats UID, unable to clear your ignore list.\n");
239 sprint(caller,
"All permanent ignores cleared!\n");
246 sprint(caller,
"\nUsage:^3 cmd clear_ignores\n");
247 sprint(caller,
" Removes all existing ignored clients whose are kept out of personal chat log.\n");
266 sprint(caller,
"\nUsage:^3 cmd clear_bestcptimes\n");
267 sprint(caller,
" Clear all your checkpoint times for this game.\n");
283 CS(caller).version = ((
argv(1) ==
"$gameversion") ? 1 :
stof(
argv(1)));
287 CS(caller).version_mismatch =
true;
297 stuffcmd(caller,
"team_selection_show\n");
306 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
309 sprint(caller,
"\nUsage:^3 cmd clientversion <version>\n");
310 sprint(caller,
" Where <version> is the game version reported by caller.\n");
331 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
334 sprint(caller,
"\nUsage:^3 cmd mv_getpicture <mapid>\n");
335 sprint(caller,
" Where <mapid> is the id number of the map to request an image of on the map vote selection menu.\n");
349 sprint(caller,
"ERROR: this command works only if the waypoint editor is on\n");
355 if (
argv(1) ==
"spawn")
359 sprint(caller,
"ERROR: this command works only if you are player\n");
364 else if (
argv(1) ==
"remove")
367 sprint(caller,
"ERROR: this command works only if you are player\n");
372 else if (
argv(1) ==
"hardwire")
378 else if (
argv(1) ==
"lock")
383 else if (
argv(1) ==
"unreachable")
386 sprint(caller,
"ERROR: this command works only if you are player\n");
391 else if (
argv(1) ==
"saveall")
396 else if (
argv(1) ==
"relinkall")
401 else if (
argv(1) ==
"symaxis")
403 if (
argv(2) ==
"set" ||
argv(2) ==
"get")
409 else if (
argv(1) ==
"symorigin")
411 if (
argv(2) ==
"set" ||
argv(2) ==
"get")
421 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
424 sprint(caller,
"\nUsage:^3 cmd wpeditor <action>\n");
425 sprint(caller,
" Where <action> can be:\n");
426 sprint(caller,
" ^2spawn^7: spawns a waypoint at player's position\n");
427 sprint(caller,
" ^2remove^7: removes player's nearest waypoint\n");
428 sprint(caller,
" ^2unreachable^7: reveals waypoints and items unreachable from the current position and spawnpoints without a nearest waypoint\n");
429 sprint(caller,
" ^2saveall^7: saves all waypoints and links to file\n");
430 sprint(caller,
" ^2relinkall^7: relinks all waypoints as if they were respawned\n");
431 sprint(caller,
" ^2spawn crosshair^7: spawns a waypoint at crosshair's position\n");
432 sprint(caller,
" ^7 in general useful to create special and hardwired links with ease from existing waypoints\n");
433 sprint(caller,
" ^7 in particular it's the only way to create custom jumppad waypoints (spawn another waypoint to create destination))\n");
434 sprint(caller,
" ^2spawn jump^7: spawns a jump waypoint (place it at least 60 qu before jump start, spawn another waypoint to create destination)\n");
435 sprint(caller,
" ^2spawn crouch^7: spawns a crouch waypoint (it links only to very close waypoints)\n");
436 sprint(caller,
" ^2spawn support^7: spawns a support waypoint (spawn another waypoint to create destination from which all incoming links are removed)\n");
437 sprint(caller,
" ^7 useful to replace links to problematic jumppad/teleport waypoints\n");
438 sprint(caller,
" ^2hardwire^7: marks the nearest waypoint as origin of a new hardwired link (spawn another waypoint over an existing one to create destination)\n");
439 sprint(caller,
" ^2hardwire crosshair^7: marks the waypoint at crosshair instead of the nearest waypoint\n");
440 sprint(caller,
" ^2lock^7: locks link display of the aimed waypoint (unlocks if no waypoint is found at crosshair's position)\n");
441 sprint(caller,
" ^2symorigin get|set\n");
442 sprint(caller,
" ^2symorigin get|set <p1> <p2> ... <pX>\n");
443 sprint(caller,
" ^2symaxis get|set <p1> <p2>\n");
444 sprint(caller,
" ^7 where <p1> <p2> ... <pX> are positions (\"x y z\", z can be omitted) that you know are perfectly symmetrical"
445 " so you can determine origin/axis of symmetry of maps without ctf flags or where flags aren't perfectly symmetrical\n");
446 sprint(caller,
" See ^5wpeditor_menu^7 for a selectable list of various commands and useful settings to edit waypoints.\n");
462 sprint(caller,
"This command requires an argument. Use a player's name or their ID from the ^2status^7 command.\n");
471 if (ignore_to != caller)
475 sprint(caller, ignore_to.netname,
" ^7is already ignored!\n");
481 sprint(caller,
"You will no longer receive messages from ", ignore_to.netname,
"^7, use ^2unignore^7 to hear them again.\n");
483 sprint(caller,
"You will no longer receive messages from ", ignore_to.netname,
"^7 for this match, use ^2unignore^7 to hear them again.\n");
488 else {
sprint(caller,
"You can't ^2ignore^7 yourself.\n"); }
497 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
500 sprint(caller,
"\nUsage:^3 cmd ignore <client>\n");
501 sprint(caller,
" Where <client> is the entity number or name of the player to ignore keeping out of personal chat log.\n");
518 CS(caller).autojoin_checked = -1;
520 CS(caller).parm_idlesince =
time;
528 sprint(caller,
"\nUsage:^3 cmd join\n");
529 sprint(caller,
" No arguments required.\n");
546 sprint(caller,
"Can't die - you are already dead!\n");
558 sprint(caller,
"\nUsage:^3 cmd kill\n");
559 sprint(caller,
" No arguments required.\n");
575 sprint(caller,
"Client physics selection is currently disabled.\n");
579 if (command ==
"list" || command ==
"help")
588 sprint(caller,
strcat(
"^2Physics set successfully changed to ^3", command,
"\n"));
597 sprint(caller,
"\nUsage:^3 cmd physics <physics>\n");
598 sprint(caller,
" See 'cmd physics list' for available physics sets.\n");
599 sprint(caller,
" Argument 'default' resets to standard physics.\n");
616 caller.ready =
false;
617 bprint(
playername(caller.netname, caller.team,
false),
"^2 is ^1NOT^2 ready\n");
632 sprint(caller,
"\nUsage:^3 cmd ready\n");
633 sprint(caller,
" No arguments required.\n");
652 sprint(caller,
"\nUsage:^3 cmd say <message>\n");
653 sprint(caller,
" Where <message> is the string of text to say.\n");
673 sprint(caller,
"\nUsage:^3 cmd say_team <message>\n");
674 sprint(caller,
" Where <message> is the string of text to say.\n");
696 sprint(caller,
"^7selectteam can only be used in teamgames\n");
701 sprint(caller,
"^7selectteam can not be used as your team is forced\n");
718 if (caller.team > 0 && caller.wants_join && (!team_num || caller.team == team_num))
720 if (caller.killindicator_teamchange > 0)
724 caller.wants_join = caller.team_selected = 0;
728 if (caller.team == team_num && team_num)
740 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_TEAMCHANGE_NOTALLOWED);
751 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_TEAMCHANGE_LARGERTEAM);
759 if (
joinAllowed(caller, team_num ? team_index : -1))
765 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
768 sprint(caller,
"\nUsage:^3 cmd selectteam <team>\n");
769 sprint(caller,
" Where <team> is the prefered team to try and join.\n");
770 sprint(caller,
" Full list of options here: red, blue, yellow, pink, auto.\n");
790 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
793 sprint(caller,
"\nUsage:^3 cmd selfstuff <command>\n");
794 sprint(caller,
" Where <command> is the string to be stuffed to your client.\n");
824 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
827 sprint(caller,
"\nUsage:^3 cmd sentcvar <cvar> <arguments>\n");
828 sprint(caller,
" Where <cvar> is the cvar plus arguments to send to the server.\n");
845 sprint(caller,
"cmd spectate <client> only works when you are spectator/observer\n");
846 else if (
argv(1) ==
"0")
855 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_SPECTATE_SPEC_NOTALLOWED);
864 sprint(caller,
"Can't spectate ",
argv(1),
"^7\n");
873 if (caller.wants_join)
875 if (caller.killindicator_teamchange > 0)
879 caller.wants_join = caller.team_selected = 0;
896 sprint(caller,
"\nUsage:^3 cmd spectate [<client>]\n");
897 sprint(caller,
" Where <client> can be the player to spectate.\n");
917 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
920 sprint(caller,
"\nUsage:^3 cmd suggestmap <map>\n");
921 sprint(caller,
" Where <map> is the name of the map to suggest.\n");
937 print_to(caller,
"You can't ^2tell^7 a message while connecting.");
944 if (tell_accepted > 0)
946 if (tell_to != caller)
954 string utf8_enable_save =
cvar_string(
"utf8_enable");
957 cvar_set(
"utf8_enable", utf8_enable_save);
959 Say(caller,
false, tell_to, msg,
true);
962 else {
print_to(caller,
"You can't ^2tell^7 a message to yourself.");
return; }
964 else if (
argv(1) ==
"#0")
974 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
977 sprint(caller,
"\nUsage:^3 cmd tell <client> <message>\n");
978 sprint(caller,
" Where <client> is the entity number or name of the player to send <message> to.\n");
994 sprint(caller,
"This command requires an argument. Use a player's name or their ID from the ^2status^7 command.\n");
1003 if (unignore_to != caller)
1007 sprint(caller,
"You can now receive messages from ", unignore_to.netname,
" ^7again.\n");
1010 else {
sprint(caller,
"You can't ^2unignore^7 yourself.\n"); }
1019 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
1022 sprint(caller,
"\nUsage:^3 cmd unignore <client>\n");
1023 sprint(caller,
" Where <client> is the entity number or name of the player to stop ignoring when is keeping out of personal chat log.\n");
1065 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
1068 sprint(caller,
"\nUsage:^3 cmd voice <voicetype> [<message>]\n");
1069 sprint(caller,
" <voicetype> is the type of voice message, it can be one of these:\n");
1071 sprint(caller,
" and <message> is the text message to send.\n");
1131 FOREACH(CLIENT_COMMANDS,
true, {
print_to(caller, sprintf(
" ^2%s^7: %s", it.m_name, it.m_description)); });
1137 FOREACH(CLIENT_COMMANDS, it.m_name == c, {
1138 it.m_invokecmd(it, CMD_REQUEST_COMMAND, caller, argc, command);
1148 FOREACH(CLIENT_COMMANDS, it.m_name == c, {
1149 it.m_invokecmd(it, CMD_REQUEST_USAGE, caller, argc,
"");
1169 string command2 =
"";
1170 float len =
strlen(command);
1172 for (i = 0; i < len; ++i)
1174 if (command != command2)
return;
1190 case "begin":
break;
1191 case "download":
break;
1192 case "mv_getpicture":
break;
1193 case "wpeditor":
break;
1194 case "pause":
break;
1195 case "prespawn":
break;
1196 case "sentcvar":
break;
1197 case "spawn":
break;
1198 case "say":
case "say_team":
case "tell":
break;
1200 string arg =
argv(1);
1212 case "color":
case "topcolor":
case "bottomcolor":
1224 case "name":
case "rate":
case "rate_burstsize":
case "playermodel":
case "playerskin":
case "clientversion":
1228 LABEL(flood_control)
1237 if (mod_time < store.cmd_floodtime)
1239 sprint(
this,
strcat(
"^3CMD FLOOD CONTROL: wait ^1",
ftos(store.cmd_floodtime - mod_time),
1240 "^3 seconds, command was: ", command,
"\n"));
1250 if (
argv(0) ==
"help")
1254 sprint(
this,
"\nClient networked commands:\n");
1257 sprint(
this,
"\nCommon networked commands:\n");
1260 sprint(
this,
"\nUsage:^3 cmd <command>^7, where possible commands are listed above.\n");
1261 sprint(
this,
"For help about a specific command, type cmd help <command>\n");
void waypoint_lock(entity pl)
void waypoint_schedulerelinkall()
void waypoint_getSymmetricalAxis_cmd(entity caller, bool save, int arg_idx)
void waypoint_getSymmetricalOrigin_cmd(entity caller, bool save, int arg_idx)
void waypoint_unreachable(entity pl)
void waypoint_remove_fromeditor(entity pl)
void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bool is_crouch_wp, bool is_support_wp)
void waypoint_start_hardwiredlink(entity pl, bool at_crosshair)
#define MUTATOR_CALLHOOK(id,...)
ERASEABLE float InterpretBoolean(string input)
float CheatCommand(entity this, int argc)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define CLIENT_COMMAND(id, description)
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void ClientKill_TeamChange(entity this, float targetteam)
void ignore_list_update_on_connection(entity this)
Updates ignore list of all the players.
void ClientCommand_unignore(entity caller, int request, int argc, string command)
bool ignore_playerinlist(entity this, entity pl)
Checks if pl is ignored by this (permanently or for the current match)
void ClientCommand_wpeditor(entity caller, int request, int argc)
void ignore_list_send(entity this)
void ClientCommand_clear_bestcptimes(entity caller, int request)
void ignore_remove_player(entity this, entity ignore, bool from_db_too)
Removes a player from the ignore list of another player.
void ClientCommand_sentcvar(entity caller, int request, int argc)
float ClientCommand_macro_usage(int argc, entity caller)
void ClientCommand_kill(entity caller, int request)
void ClientCommand_macro_write_aliases(float fh)
int ignore_add_player(entity this, entity ignore, bool to_db_too)
Adds a player to the ignore list of another player.
void ClientCommand_physics(entity caller, int request, int argc)
void ClientCommand_macro_help(entity caller)
void ClientCommand_tell(entity caller, int request, int argc, string command)
void ClientCommand_clear_ignores(entity caller, int request)
void ClientCommand_ignore(entity caller, int request, int argc, string command)
void ClientCommand_selectteam(entity caller, int request, int argc)
void ClientCommand_join(entity caller, int request)
float ClientCommand_macro_command(int argc, entity caller, string command)
void ClientCommand_say(entity caller, int request, int argc, string command)
bool ignore_playerindb(entity this, entity pl)
Checks if pl is permanently ignored by this.
void ClientCommand_autoswitch(entity caller, int request, int argc)
void ClientCommand_ready(entity caller, int request)
void ClientCommand_say_team(entity caller, int request, int argc, string command)
void ClientCommand_voice(entity caller, int request, int argc, string command)
void ClientCommand_clientversion(entity caller, int request, int argc)
void ignore_clearall(entity this)
void ClientCommand_suggestmap(entity caller, int request, int argc)
void ClientCommand_selfstuff(entity caller, int request, string command)
void ClientCommand_mv_getpicture(entity caller, int request, int argc)
void ClientCommand_spectate(entity caller, int request)
string MapVote_Suggest(entity this, string m)
float ignore_list_send_time
const int IGNORE_LIST_SEND_NOW
const int IGNORE_MAXPLAYERS
float autocvar_sv_clientcommand_antispam_time
int autocvar_sv_clientcommand_antispam_count
const int CMD_REQUEST_COMMAND
const int CMD_REQUEST_USAGE
bool Physics_Valid(string thecvar)
string autocvar_g_physics_clientselect_options
bool autocvar_g_physics_clientselect
string playername(string thename, int teamid, bool team_colorize)
string strtolower(string s)
#define CMD_Write_Alias(execute, command, description)
void GetCvars(entity this, entity store, int f)
entity GetVoiceMessage(string type)
#define VoiceMessage(this, def, msg)
bool intermission_running
bool Ban_MaybeEnforceBanOnce(entity client)
#define FOREACH_WORD(words, cond, body)
#define FOREACH(list, cond, body)
#define SV_ParseClientCommand
#define PutClientInServer
void Net_ClientCommand(entity sender, string command)
string trigger_magicear_processmessage_forallears(entity source, float teamsay, entity privatesay, string msgin)
#define db_remove(db, key)
ERASEABLE string db_get(int db, string key)
ERASEABLE void db_put(int db, string key, string value)
s1 s2 s1 s2 FLAG s1 s2 FLAG spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 CPID_PREVENT_JOIN
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
void Kill_Notification(NOTIF broadcast, entity client, MSG net_type, CPID net_cpid)
#define TRANSMUTE(cname, this,...)
int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodcontrol)
message "": do not say, just test flood control return value: 1 = accept 0 = reject -1 = fake accept
bool Spectate(entity this, entity pl)
bool joinAllowed(entity this, int team_index)
bool PlayerInList(entity player, string list)
void Join(entity this, bool queued_join)
it's assumed this isn't called for bots (campaign_bots_may_start, centreprints)
void ClientData_Touch(entity e, bool to_spectators_too)
float autocvar_gameversion_min
bool autocvar_sv_spectate
float autocvar_gameversion_max
void print_to(entity to, string input)
entity GetIndexedEntity(int argc, int start_index)
int VerifyClientEntity(entity client, bool must_be_real, bool must_be_bots)
entity GetFilteredEntity(string input)
float CommonCommand_macro_usage(int argc, entity caller)
void CommonCommand_macro_help(entity caller)
#define GetClientErrorString(clienterror, original_input)
float CommonCommand_macro_command(int argc, entity caller, string command)
void MapVote_SendPicture(entity to, int id)
void race_ClearPlayerRecords(entity player)
ClientState CS(Client this)
ERASEABLE string cons(string a, string b)
void ClientCommand_minigame(entity caller, int request, int argc, string command)
string MINIGAME_COMMON_CMD[MINIGAME_COMMON_CMD_COUNT]
@ MINIGAME_COMMON_CMD_COUNT
#define INGAME_JOINED(it)
void TeamBalance_Destroy(entity balance)
Destroy the team balance entity.
void TeamBalance_GetTeamCounts(entity balance, entity ignore)
Counts the number of players and various other information about each team.
int Player_GetForcedTeamIndex(entity player)
Returns the index of the forced team of the given player.
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
bool TeamBalance_IsTeamAllowed(entity balance, int index)
Returns whether the team change to the specified team is allowed.
int TeamBalance_FindBestTeams(entity balance, entity player, bool use_score)
Returns the bitmask of the teams that will make the game most balanced if the player joins any of the...
bool autocvar_g_balance_teams_prevent_imbalance
bool autocvar_g_balance_teams
int Team_TeamToIndex(int team_num)
Converts team value into team index.
int Team_IndexToBit(int index)
Converts team index into bit value that is used in team bitmasks.
float Team_ColorToTeam(string team_color)
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)
bool waypointeditor_enabled