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 sprint(caller,
"Can't die - you are already dead!\n");
530 sprint(caller,
"\nUsage:^3 cmd kill\n");
531 sprint(caller,
" No arguments required.\n");
547 sprint(caller,
"Client physics selection is currently disabled.\n");
551 if (command ==
"list" || command ==
"help")
560 sprint(caller,
strcat(
"^2Physics set successfully changed to ^3", command,
"\n"));
569 sprint(caller,
"\nUsage:^3 cmd physics <physics>\n");
570 sprint(caller,
" See 'cmd physics list' for available physics sets.\n");
571 sprint(caller,
" Argument 'default' resets to standard physics.\n");
588 caller.ready =
false;
589 bprint(
playername(caller.netname, caller.team,
false),
"^2 is ^1NOT^2 ready\n");
604 sprint(caller,
"\nUsage:^3 cmd ready\n");
605 sprint(caller,
" No arguments required.\n");
624 sprint(caller,
"\nUsage:^3 cmd say <message>\n");
625 sprint(caller,
" Where <message> is the string of text to say.\n");
645 sprint(caller,
"\nUsage:^3 cmd say_team <message>\n");
646 sprint(caller,
" Where <message> is the string of text to say.\n");
658 CS(caller).parm_idlesince =
time;
668 CS(caller).autojoin_checked = -1;
684 sprint(caller, sprintf(
"^7There's no \"%s\" team!\n",
argv(1)));
689 if (caller.team > 0 && caller.wants_join && (!team_num || caller.team == team_num))
691 if (caller.killindicator_teamchange > 0)
695 caller.wants_join = caller.team_selected = 0;
701 if (caller.team == team_num)
703 if (caller.clientkill_nexttime <
time)
707 caller.clientkill_nexttime =
max(
time, caller.clientkill_nexttime);
719 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_JOIN_PREVENT_FORCEDSPEC);
720 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_JOIN_PREVENT_FORCEDSPEC);
723 else if (team_index > 0 && team_index != forced_team_index)
740 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_TEAMCHANGE_STRONGERTEAM);
741 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_TEAMCHANGE_STRONGERTEAM);
749 if (
joinAllowed(caller, team_num ? team_index : -1))
752 caller.clientkill_nexttime =
max(
time, caller.clientkill_nexttime);
757 CS(caller).autojoin_checked = -1;
762 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
765 sprint(caller,
"\nUsage:^3 cmd join <team>\n");
766 sprint(caller,
" Where <team> is the prefered team to try and join.\n");
767 sprint(caller,
" Full list of options here: red, blue, yellow, pink, auto.\n");
787 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
790 sprint(caller,
"\nUsage:^3 cmd selfstuff <command>\n");
791 sprint(caller,
" Where <command> is the string to be stuffed to your client.\n");
821 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
824 sprint(caller,
"\nUsage:^3 cmd sentcvar <cvar> <arguments>\n");
825 sprint(caller,
" Where <cvar> is the cvar plus arguments to send to the server.\n");
842 sprint(caller,
"cmd spectate <client> only works when you are spectator/observer\n");
843 else if (
argv(1) ==
"0")
852 Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_SPECTATE_SPEC_NOTALLOWED);
861 sprint(caller,
"Can't spectate ",
argv(1),
"^7\n");
870 if (caller.wants_join)
872 if (caller.killindicator_teamchange > 0)
876 caller.wants_join = caller.team_selected = 0;
893 sprint(caller,
"\nUsage:^3 cmd spectate [<client>]\n");
894 sprint(caller,
" Where <client> can be the player to spectate.\n");
914 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
917 sprint(caller,
"\nUsage:^3 cmd suggestmap <map>\n");
918 sprint(caller,
" Where <map> is the name of the map to suggest.\n");
934 print_to(caller,
"You can't ^2tell^7 a message while connecting.");
941 if (tell_accepted > 0)
943 if (tell_to != caller)
951 string utf8_enable_save =
cvar_string(
"utf8_enable");
954 cvar_set(
"utf8_enable", utf8_enable_save);
956 Say(caller,
false, tell_to, msg,
true);
959 else {
print_to(caller,
"You can't ^2tell^7 a message to yourself.");
return; }
961 else if (
argv(1) ==
"#0")
971 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
974 sprint(caller,
"\nUsage:^3 cmd tell <client> <message>\n");
975 sprint(caller,
" Where <client> is the entity number or name of the player to send <message> to.\n");
991 sprint(caller,
"This command requires an argument. Use a player's name or their ID from the ^2status^7 command.\n");
1000 if (unignore_to != caller)
1004 sprint(caller,
"You can now receive messages from ", unignore_to.netname,
" ^7again.\n");
1007 else {
sprint(caller,
"You can't ^2unignore^7 yourself.\n"); }
1016 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
1019 sprint(caller,
"\nUsage:^3 cmd unignore <client>\n");
1020 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");
1062 sprint(caller, sprintf(
"Incorrect parameters for ^2%s^7\n",
argv(0)));
1065 sprint(caller,
"\nUsage:^3 cmd voice <voicetype> [<message>]\n");
1066 sprint(caller,
" <voicetype> is the type of voice message, it can be one of these:\n");
1068 sprint(caller,
" and <message> is the text message to send.\n");
1128 FOREACH(CLIENT_COMMANDS,
true, {
print_to(caller, sprintf(
" ^2%s^7: %s", it.m_name, it.m_description)); });
1134 FOREACH(CLIENT_COMMANDS, it.m_name == c, {
1135 it.m_invokecmd(it, CMD_REQUEST_COMMAND, caller, argc, command);
1145 FOREACH(CLIENT_COMMANDS, it.m_name == c, {
1146 it.m_invokecmd(it, CMD_REQUEST_USAGE, caller, argc,
"");
1165 if (mod_time < store.(antispam_fld))
1167 sprint(
this,
strcat(
"^3CMD FLOOD CONTROL: wait ^1",
ftos(store.(antispam_fld) - mod_time),
1168 "^3 seconds, command was: ", command,
"\n"));
1185 string command2 =
"";
1186 float len =
strlen(command);
1188 for (i = 0; i < len; ++i)
1190 if (command != command2)
return;
1206 case "begin":
break;
1207 case "download":
break;
1208 case "mv_getpicture":
break;
1209 case "wpeditor":
break;
1210 case "pause":
break;
1211 case "prespawn":
break;
1212 case "sentcvar":
break;
1213 case "spawn":
break;
1214 case "say":
case "say_team":
case "tell":
break;
1216 string arg =
argv(1);
1228 case "color":
case "topcolor":
case "bottomcolor":
1240 case "name":
case "rate":
case "rate_burstsize":
case "playermodel":
case "playerskin":
case "clientversion":
1244 LABEL(flood_control)
1253 if (
argv(0) ==
"help")
1257 sprint(
this,
"\nClient networked commands:\n");
1260 sprint(
this,
"\nCommon networked commands:\n");
1263 sprint(
this,
"\nUsage:^3 cmd <command>^7, where possible commands are listed above.\n");
1264 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)
Get true/false value of a string with multiple different inputs.
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)
Used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a ....
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)
bool ClientCommand_antispam(entity this, string command,.float antispam_fld, float antispam_time, int antispam_count)
Returns true if antispam should prevent the command.
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)
float ClientCommand_macro_command(int argc, entity caller, string command)
void ClientCommand_say(entity caller, int request, int argc, string command)
void ClientCommand_join(entity caller, int request, int argc)
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)
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)
void MapVote_WritePicture(entity to, int id)
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 NAME 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 APP_TEAM_NUM(num, prefix)
#define TRANSMUTE(cname, this,...)
#define AVAILABLE_TEAMS
Number of teams that exist currently.
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 race_ClearPlayerRecords(entity player)
ClientState CS(Client this)
ERASEABLE string cons(string a, string b)
string MapVote_Suggest(entity this, string m)
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.
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_queue
@ TEAM_FORCE_DEFAULT
Don't force any team.
@ TEAM_FORCE_SPECTATOR
Force the player to spectator team.
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_IndexToTeam(int index)
Converts team index into team value.
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