38 LOG_INFO(
"Done rebuiling mapinfos.");
72 update =
min(ma, lim + delta);
81 update =
max(mi, lim + delta);
102 LOG_HELPF(
"This command works only when the server is running.");
108 string targets = strreplace(
",",
" ",
argv(1));
109 string original_targets = strreplace(
" ",
", ", targets);
110 string admin_message =
argv(2);
113 string successful, t;
116 if ((targets) && (admin_message))
121 targets =
cdr(targets);
142 successful =
strcat(successful, (successful ?
", " :
""),
playername(client.netname, client.team,
false));
148 bprint(
"Successfully sent message '", admin_message,
"' to ", successful,
".\n");
150 LOG_INFO(
"No players given (", original_targets,
") could receive the message.");
160 LOG_HELP(
"Usage:^3 sv_cmd adminmsg <clients> \"<message>\" [<infobartime>]");
161 LOG_HELP(
" <clients> is a list (separated by commas) of player entity ID's or nicknames");
162 LOG_HELP(
" If <infobartime> is provided, the message will be sent to infobar.");
163 LOG_HELP(
" Otherwise, it will just be sent as a centerprint message.");
164 LOG_HELP(
"Examples: adminmsg 2,4 \"this infomessage will last for ten seconds\" 10");
165 LOG_HELP(
" adminmsg 2,5 \"this message will be a centerprint\"");
179 LOG_HELPF(
"This command works only when the server is running.");
193 LOG_HELP(
"Usage:^3 sv_cmd allready");
194 LOG_HELP(
" No arguments required.");
208 LOG_HELPF(
"This command works only when the server is running.");
211 string reason =
argv(1);
218 bprint(
strcat(
"Successfully forced all (",
ftos(n),
") players to spectate",
219 (reason ?
strcat(
" for reason: '", reason,
"'") :
""),
".\n"));
221 LOG_INFO(
"No players found to spectate.");
228 LOG_HELP(
"Usage:^3 sv_cmd allspec [<reason>]");
229 LOG_HELP(
" Where <reason> is an optional argument for explanation of allspec command.");
230 LOG_HELP(
"See also: ^2moveplayer, shuffleteams^7");
244 LOG_HELPF(
"This command works only when the server is running.");
262 LOG_HELP(
"Usage:^3 sv_cmd anticheat <client>");
263 LOG_HELP(
" <client> is the entity number or name of the player.");
283 url_fputs(fh, sprintf(
"R %s\n", WATERMARK));
299 url_fputs(fh, sprintf(
"P %s\n", it.playerstats_id));
300 url_fputs(fh, sprintf(
"i %d\n", it.playerid));
301 url_fputs(fh, sprintf(
"n %s\n", it.netname));
302 url_fputs(fh, sprintf(
"t %d\n", it.team));
316 alivetime +=
max(0,
time - it.alivetime_start);
317 url_fputs(fh, sprintf(
"e alivetime %g\n", alivetime));
320 url_fputs(fh,
"e acc-blaster-cnt-fired 1\n");
333 string response_data =
"";
334 string team_rows =
"";
337 int current_player_id = 0;
340 if (response_data !=
"")
342 response_data =
strcat(response_data,
"\n", s);
368 bprint(
"Team assignments and skill ratings:\n", team_rows);
380 bprint(
"Failed to balanceteams teams: status code from XonStat API is ",
ftos(status),
"\n");
390 bprint(
"Can't balance teams when currently not playing a team game.\n");
394 int active_player_count = 0;
396 ++active_player_count;
398 if (active_player_count <= 1)
400 bprint(
"You need more than 1 player to balance the teams.\n");
403 if (active_player_count > 128)
405 bprint(
"Balancing is only supported for max 128 players, you currently have %d players.\n", active_player_count);
410 bprint(
"XonStat does not support balancing with more than 4 teams.\n");
419 team_not_empty[i] =
false;
420 int switch_count = 0;
426 switch_players[switch_count++] = it;
433 for (
int i = 0; i < switch_count; ++i)
435 while (team_not_empty[team_i])
442 bprint(
"Attempting to balance teams by skill...\n");
443 string balance_uri_with_query_params = sprintf(
"%s?scorefactor=%d&maxDifference=%d&stability=%d&sigmaRange=%.2f",
459 LOG_HELPF(
"This command works only when the server is running.");
461 bprint(
"Players will be balanced by skill when this round is over.\n");
469 LOG_HELP(
"Usage:^3 sv_cmd balanceteams");
470 LOG_HELP(
" No arguments required.");
471 LOG_HELP(
" Balances teams by skill.");
483 vector size_min =
'0 0 0';
484 vector size_max =
'0 0 0';
485 tracebox(
'1 0 0' *
world.absmin.x,
486 '0 1 0' *
world.absmin.y +
'0 0 1' *
world.absmin.z,
487 '0 1 0' *
world.absmax.y +
'0 0 1' *
world.absmax.z,
488 '1 0 0' *
world.absmax.x,
493 tracebox(
'0 1 0' *
world.absmin.y,
494 '1 0 0' *
world.absmin.x +
'0 0 1' *
world.absmin.z,
495 '1 0 0' *
world.absmax.x +
'0 0 1' *
world.absmax.z,
496 '0 1 0' *
world.absmax.y,
501 tracebox(
'0 0 1' *
world.absmin.z,
502 '1 0 0' *
world.absmin.x +
'0 1 0' *
world.absmin.y,
503 '1 0 0' *
world.absmax.x +
'0 1 0' *
world.absmax.y,
504 '0 0 1' *
world.absmax.z,
509 tracebox(
'1 0 0' *
world.absmax.x,
510 '0 1 0' *
world.absmin.y +
'0 0 1' *
world.absmin.z,
511 '0 1 0' *
world.absmax.y +
'0 0 1' *
world.absmax.z,
512 '1 0 0' *
world.absmin.x,
517 tracebox(
'0 1 0' *
world.absmax.y,
518 '1 0 0' *
world.absmin.x +
'0 0 1' *
world.absmin.z,
519 '1 0 0' *
world.absmax.x +
'0 0 1' *
world.absmax.z,
520 '0 1 0' *
world.absmin.y,
525 tracebox(
'0 0 1' *
world.absmax.z,
526 '1 0 0' *
world.absmin.x +
'0 1 0' *
world.absmin.y,
527 '1 0 0' *
world.absmax.x +
'0 1 0' *
world.absmax.y,
528 '0 0 1' *
world.absmin.z,
535 LOG_INFOF(
"Solid bounding box size: %v %v", size_min, size_max);
543 LOG_HELP(
" No arguments required.");
544 LOG_HELP(
"See also: ^2gettaginfo, trace^7");
558 LOG_HELPF(
"This command works only when the server is running.");
563 if (
argv(1) ==
"reset")
568 else if (
argv(1) ==
"setbots")
577 LOG_INFO(
"Sorry, could not set requested bot count");
580 else if (
argv(1) ==
"load" && argc == 3)
592 while ((s =
fgets(fh)))
596 if (argc >= 3 &&
argv(0) ==
"sv_cmd" &&
argv(1) ==
"bot_cmd")
598 if (
argv(2) ==
"reset")
600 else if (
argv(2) ==
"setbots")
609 LOG_INFO(
"Sorry, could not set requested bot count");
613 if (
argv(2) ==
"*" ||
argv(2) ==
"all")
636 else if (
argv(1) ==
"help")
646 if (
argv(1) ==
"*" ||
argv(1) ==
"all")
669 LOG_INFO(
"Error: Can't find bot with the name or id '",
argv(1),
"' - Did you mistype the command?");
678 LOG_HELP(
"Usage:^3 sv_cmd bot_cmd <client> <command> [<arguments>]");
679 LOG_HELP(
" <client> can be either the name of the bot or a progressive number (not the entity number!)");
680 LOG_HELP(
" can also be '*' or 'all' to allow sending the command to all the bots");
681 LOG_HELP(
" For full list of commands, see bot_cmd help [<command>].");
682 LOG_HELP(
"Examples: sv_cmd bot_cmd 1 cc say something");
683 LOG_HELP(
" sv_cmd bot_cmd 1 presskey jump");
684 LOG_HELP(
" sv_cmd bot_cmd * pause");
698 LOG_HELPF(
"This command works only when the server is running.");
703 string choice = ((
random() > 0.5) ? result1 : result2);
712 LOG_HELP(
"Usage:^3 sv_cmd cointoss [<result1> <result2>]");
713 LOG_HELP(
" Where <result1> and <result2> are user created options.");
727 if (
argv(1) ==
"save")
730 LOG_INFO(
"Copied serverprogs database to '",
argv(2),
"' in the data directory.");
733 else if (
argv(1) ==
"dump")
739 else if (
argv(1) ==
"load")
743 LOG_INFO(
"Loaded '",
argv(2),
"' as new serverprogs database.");
753 LOG_HELP(
"Usage:^3 sv_cmd database <action> <filename>");
754 LOG_HELP(
" Where <action> is the command to complete,");
755 LOG_HELP(
" and <filename> is what it acts upon.");
756 LOG_HELP(
" Full list of commands here: save, dump, load.");
770 LOG_HELPF(
"This command works only when the server is running.");
797 LOG_HELP(
"Usage:^3 sv_cmd defer_clear <client>");
798 LOG_HELP(
" <client> is the entity number or name of the player.");
799 LOG_HELP(
"See also: ^2defer_clear_all^7");
813 LOG_HELPF(
"This command works only when the server is running.");
825 LOG_INFO(
"Successfully stuffed defer clear to all clients (",
ftos(n),
")");
832 LOG_HELP(
"Usage:^3 sv_cmd defer_clear_all");
833 LOG_HELP(
" No arguments required.");
834 LOG_HELP(
"See also: ^2defer_clear^7");
860 LOG_HELP(
"Usage:^3 sv_cmd delrec <ranking> [<map>]");
861 LOG_HELP(
" <ranking> is which ranking level to clear up to, ");
862 LOG_HELP(
" it will clear all records up to nth place.");
863 LOG_HELP(
" if <map> is not provided it will use current map.");
872 LOG_INFO(
"effect ", effect_name,
" is ",
ftos(_particleeffectnum(effect_name)),
"\n");
873 db_put(d, effect_name,
"1");
926 while ((s =
fgets(fh)))
929 if (
argv(0) ==
"effect")
933 int i = _particleeffectnum(
argv(1));
949 LOG_HELP(
"Usage:^3 sv_cmd effectindexdump");
950 LOG_HELP(
" No arguments required.");
964 LOG_HELPF(
"This command works only when the server is running.");
974 LOG_HELP(
"Usage:^3 sv_cmd extendmatchtime");
975 LOG_HELP(
" No arguments required.");
976 LOG_HELP(
"See also: ^2reducematchtime^7");
990 LOG_HELPF(
"This command works only when the server is running.");
1005 bprint(
"Failed to switch to ", s,
": this gametype does not exist!\n");
1015 LOG_HELP(
"Usage:^3 sv_cmd gametype <mode>");
1016 LOG_HELP(
" Where <mode> is the gametype mode to switch to.");
1039 precache_model(
argv(1));
1040 _setmodel(tmp_entity,
argv(1));
1051 LOG_HELPF(
"model %s frame %s tag %s index %s parent %s",
1077 LOG_HELP(
"Usage:^3 sv_cmd gettaginfo <model> <frame> <index> [<command1>] [<command2>]");
1078 LOG_HELP(
"See also: ^2bbox, trace^7");
1100 precache_model(
argv(1));
1101 _setmodel(tmp_entity,
argv(1));
1112 tmp_entity.frame =
f1;
1114 getsurfacepoint(tmp_entity, 0, 0);
1116 tmp_entity.frame =
f2;
1118 getsurfacepoint(tmp_entity, 0, 0);
1122 LOG_INFO(
"model ", tmp_entity.model,
" frame ",
ftos(
f1),
" animtime ",
ftos(n / t1),
"/s");
1123 LOG_INFO(
"model ", tmp_entity.model,
" frame ",
ftos(
f2),
" animtime ",
ftos(n / t2),
"/s");
1134 LOG_HELP(
"Usage:^3 sv_cmd animbench <model> <frame1> <frame2>");
1135 LOG_HELP(
"See also: ^2bbox, trace^7");
1149 LOG_HELPF(
"This command works only when the server is running.");
1163 LOG_HELP(
"Usage:^3 sv_cmd gotomap <map>");
1164 LOG_HELP(
" Where <map> is the *.bsp file to change to.");
1165 LOG_HELP(
"See also: ^2gametype^7");
1179 LOG_HELPF(
"This command works only when the server is running.");
1187 FOREACH_CLIENT(it.wants_join, it.wants_join = it.team_selected = 0);
1190 bprint(
"lockteams command can only be used in a team-based gametype.\n");
1197 LOG_HELP(
"Usage:^3 sv_cmd lockteams");
1198 LOG_HELP(
" No arguments required.");
1199 LOG_HELP(
"See also: ^2unlockteams^7");
1211 entity tmp_entity =
new(make_mapinfo);
1213 tmp_entity.nextthink =
time;
1221 LOG_HELP(
"Usage:^3 sv_cmd make_mapinfo");
1222 LOG_HELP(
" No arguments required.");
1223 LOG_HELP(
"See also: ^2radarmap^7");
1237 LOG_HELPF(
"This command works only when the server is running.");
1243 string targets = strreplace(
",",
" ",
argv(1));
1244 string original_targets = strreplace(
" ",
", ", targets);
1245 string destination =
argv(2);
1246 if (destination ==
"spec")
1247 destination =
"spectator";
1249 if ((targets) && (destination))
1256 targets =
cdr(targets);
1261 string client_num_str =
ftos(
etof(client));
1265 else if (destination ==
"spectator")
1267 string pl_name =
playername(client.netname, client.team,
false);
1272 successful =
strcat(successful, (successful ?
", " :
""), pl_name);
1275 LOG_INFO(
"Player #", client_num_str,
" (", pl_name,
") is already spectating.");
1281 LOG_INFO(
"Can't change teams when currently not playing a team game.");
1285 string pl_name =
playername(client.netname, client.team,
false);
1289 LOG_INFO(
"Player #", client_num_str,
" (", pl_name,
") is not in the game.");
1296 if (team_num == client.team)
1298 LOG_INFO(
"Player #", client_num_str,
" (", pl_name,
") is already on the ",
1313 LOG_INFO(
"Can't move player to ", destination,
" team because it doesn't exist.");
1319 LOG_INFO(
"Can't move player to ", destination,
" team because it isn't available.");
1325 LOG_INFO(
"Player #", client_num_str,
" (", pl_name,
") is not allowed to join the ",
1335 successful =
strcat(successful, (successful ?
", " :
""), pl_name);
1336 LOG_INFO(
"Player #", client_num_str,
" (", pl_name,
") has been moved to the ",
1340 LOG_INFO(
"Unable to move player #", client_num_str,
" (", pl_name,
")");
1345 bprint(
"Successfully moved players ", successful,
" to destination ", destination,
".\n");
1347 LOG_INFO(
"No players given (", original_targets,
") are able to move.");
1357 LOG_HELP(
"Usage:^3 sv_cmd moveplayer <clients> <destination>");
1358 LOG_HELP(
" <clients> is a list (separated by commas) of player entity ID's or nicknames");
1359 LOG_HELP(
" <destination> is what to send the player to, be it team or spectating");
1360 LOG_HELP(
" Full list of destinations here: spec, spectator, red, blue, yellow, pink, auto.");
1361 LOG_HELP(
"Examples: sv_cmd moveplayer 1,3,5 red");
1362 LOG_HELP(
" sv_cmd moveplayer 2 spec");
1363 LOG_HELP(
"See also: ^2allspec, shuffleteams^7");
1378 LOG_HELP(
"Warning: nextmap only takes 1 argument");
1397 LOG_HELP(
"Usage:^3 sv_cmd nextmap [<mapname>]");
1398 LOG_HELP(
" Without arguments it prints current nextmap if one is set");
1399 LOG_HELP(
" With arguments it attempts to set nextmap");
1413 LOG_HELPF(
"This command works only when the server is running.");
1424 LOG_HELP(
"Usage:^3 sv_cmd nospectators");
1425 LOG_HELP(
" No arguments required.");
1426 LOG_HELP(
"Temporarily disables the ^3sv_spectate ^7cvar.");
1440 LOG_HELPF(
"This command works only when the server is running.");
1451 LOG_HELP(
"Usage:^3 sv_cmd printstats");
1452 LOG_HELP(
" No arguments required.");
1472 LOG_HELP(
"Usage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]");
1473 LOG_HELP(
" The quality factor Q is roughly proportional to the time taken.");
1474 LOG_HELP(
" trace supports no quality factor; its result should look like --block with infinite quality factor.");
1475 LOG_HELP(
"See also: ^2make_mapinfo^7");
1489 LOG_HELPF(
"This command works only when the server is running.");
1499 LOG_HELP(
"Usage:^3 sv_cmd reducematchtime");
1500 LOG_HELP(
" No arguments required.");
1501 LOG_HELP(
"See also: ^2extendmatchtime^7");
1527 LOG_HELP(
"Usage:^3 sv_cmd setbots <botnumber>");
1528 LOG_HELP(
" Where <botnumber> is the amount of bots to set bot_number cvar to.");
1539 LOG_INFO(
"Can't shuffle teams when currently not playing a team game.");
1548 LOG_INFO(
"Can't shuffle teams because at least one player has a forced team.");
1553 int number_of_teams = 0;
1557 number_of_teams =
max(i, number_of_teams);
1562 int target_team_index = team_index + 1;
1565 team_index = (team_index + 1) % number_of_teams;
1568 bprint(
"Successfully shuffled the players around randomly.\n");
1579 LOG_HELPF(
"This command works only when the server is running.");
1584 bprint(
"Players will be shuffled when this round is over.\n");
1595 LOG_HELP(
"Usage:^3 sv_cmd shuffleteams");
1596 LOG_HELP(
" No arguments required.");
1597 LOG_HELP(
"See also: ^2moveplayer, allspec^7");
1611 LOG_HELPF(
"This command works only when the server is running.");
1621 LOG_HELP(
"Usage:^3 sv_cmd resetmatch");
1622 LOG_HELP(
" No arguments required.");
1634#ifdef STUFFTO_ENABLED
1641 LOG_HELPF(
"This command works only when the server is running.");
1665 LOG_HELP(
"Usage:^3 sv_cmd stuffto <client> \"<command>\"");
1666 LOG_HELP(
" <client> is the entity number or name of the player,");
1667 LOG_HELP(
" and <command> is the command to be sent to that player.");
1674 LOG_HELP(
"stuffto command is not enabled on this server.");
1687 vector org, delta, start, end, p, q, q0, pos, vv, dv;
1688 float i, f, safe, unsafe, dq, dqf;
1695 LOG_INFO(
"TEST CASE. If this returns the runaway loop counter error, possibly everything is oaky.");
1696 float worst_endpos_bug = 0;
1728 pos = p * (1 - (safe + unsafe) * 0.5) + start * ((safe + unsafe) * 0.5);
1732 if ((safe + unsafe) * 0.5 == unsafe)
1734 unsafe = (safe + unsafe) * 0.5;
1738 if ((safe + unsafe) * 0.5 == safe)
1740 safe = (safe + unsafe) * 0.5;
1744 LOG_INFO(
"safe distance to back off: ",
ftos(safe *
vlen(p - start)),
"qu");
1745 LOG_INFO(
"unsafe distance to back off: ",
ftos(unsafe *
vlen(p - start)),
"qu");
1749 LOG_INFO(
"trace_endpos much in solid when tracing from ",
vtos(start),
" to ",
vtos(end),
" endpos ",
vtos(p));
1751 LOG_INFO(
"trace_endpos just in solid when tracing from ",
vtos(start),
" to ",
vtos(end),
" endpos ",
vtos(p));
1752 if (++hitcount >= 10)
1762 q = p +
normalize(end - p) * (dq + dqf);
1767 error(
"THIS ONE cannot happen");
1773 if (dq > worst_endpos_bug)
1775 worst_endpos_bug = dq;
1776 LOG_INFO(
"trace_endpos still before solid when tracing from ",
vtos(start),
" to ",
vtos(end),
" endpos ",
vtos(p));
1778 if (++hitcount >= 10)
1790 tracebox(e.origin +
'0 0 32', e.mins, e.maxs, e.origin +
'0 0 -1024',
MOVE_NORMAL, e);
1794 LOG_INFO(
"not above ground, aborting");
1798 for (i = 0; i < 100000; ++i)
1803 tracebox(vv, e.mins, e.maxs, vv + dv,
MOVE_NORMAL, e);
1822 if (argc == 4 || argc == 5)
1825 int dphitcontentsmask_save = e.dphitcontentsmask;
1831 e.dphitcontentsmask = dphitcontentsmask_save;
1857 LOG_HELP(
"Usage:^3 sv_cmd trace <command> [<startpos> <endpos>] [<endpos_height>]");
1858 LOG_HELP(
" Where <startpos> and <endpos> are parameters for the 'walk' and 'showline' commands,");
1859 LOG_HELP(
" <endpos_height> is an optional parameter for the 'walk' command,");
1860 LOG_HELP(
" Full list of commands here: debug, debug2, walk, showline.");
1861 LOG_HELP(
"See also: ^2bbox, gettaginfo^7");
1875 LOG_HELPF(
"This command works only when the server is running.");
1884 bprint(
"unlockteams command can only be used in a team-based gametype.\n");
1891 LOG_HELP(
"Usage:^3 sv_cmd unlockteams");
1892 LOG_HELP(
" No arguments required.");
1893 LOG_HELP(
"See also: ^2lockteams^7");
1907 LOG_HELPF(
"This command works only when the server is running.");
1915 LOG_INFO(
"Successfully warped to campaign level ",
argv(1),
".");
1920 LOG_INFO(
"Successfully warped to next campaign level.");
1924 LOG_INFO(
"Not in campaign, can't level warp");
1931 LOG_HELP(
"Usage:^3 sv_cmd warp [<level>]");
1932 LOG_HELP(
" <level> is the level to change campaign mode to.");
1933 LOG_HELP(
" if <level> is not provided it will change to the next level.");
2009 FOREACH(SERVER_COMMANDS,
true, {
LOG_HELPF(
" ^2%s^7: %s", it.m_name, it.m_description); });
2015 FOREACH(SERVER_COMMANDS, it.m_name == c, {
2016 it.m_invokecmd(it, CMD_REQUEST_COMMAND, NULL, argc, command);
2025 FOREACH(SERVER_COMMANDS, it.m_name == c, {
2026 it.m_invokecmd(it, CMD_REQUEST_USAGE, NULL, argc,
"");
2056 LOG_HELP(
"Server console commands:");
2062 LOG_HELP(
"\nCommon networked commands:");
2065 LOG_HELP(
"\nGeneric commands shared by all programs:");
2068 LOG_HELP(
"\nUsage:^3 sv_cmd <command>^7, where possible commands are listed above.\n"
2069 "For help about a specific command, type sv_cmd help <command>");
2094 LOG_INFO(((command !=
"") ?
strcat(
"Unknown server command \"", command,
"\"") :
"No command provided"),
". For a list of supported commands, try sv_cmd help.");
entity find_bot_by_number(float number)
bool bot_fixcount(bool multiple_per_frame)
entity find_bot_by_name(string name)
void bot_queuecommand(entity bot, string cmdstring)
void bot_cmdhelp(string scmd)
bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float end_height, float movemode)
void BanCommand_macro_help()
float BanCommand_macro_usage(int argc)
float BanCommand(string command)
#define MUTATOR_CALLHOOK(name,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const int CMD_REQUEST_COMMAND
const int CMD_REQUEST_USAGE
#define autocvar_timelimit
string playername(string thename, int teamid, bool team_colorize)
float cvar_settemp(string tmp_cvar, string tmp_value)
string strtolower(string s)
const vector PL_MIN_CONST
const vector PL_MAX_CONST
const float MOVE_NOMONSTERS
vector gettaginfo_forward
float DPCONTENTS_PLAYERCLIP
ERASEABLE string MakeConsoleSafe(string input)
Escape the string to make it safe for consoles.
#define particleeffectnum(e)
float GenericCommand_macro_usage(int argc)
void GenericCommand_macro_help()
float GenericCommand(string command)
#define CMD_Write_Alias(execute, command, description)
void Set_NextMap(string mapname)
#define FOREACH(list, cond, body)
ERASEABLE void db_close(int db)
ERASEABLE int db_load(string filename)
ERASEABLE int db_create()
ERASEABLE void db_save(int db, string filename)
ERASEABLE string db_get(int db, string key)
ERASEABLE void db_put(int db, string key, string value)
ERASEABLE void db_dump(int db, string filename)
float MapInfo_FilterGametype(Gametype pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
int MapInfo_RequiredFlags()
float _MapInfo_FilterGametype(vector pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
Gametype MapInfo_CurrentGametype()
int MapInfo_ForbiddenFlags()
int MapInfo_CurrentFeatures()
Gametype MapInfo_Type_FromString(string gtype, bool dowarn, bool is_q3compat)
s2 minigame1_name minigames s f2
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
s2 minigame1_name minigames s f1
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
string PlayerStats_GetGametype()
int autocvar_g_playerstats_balance_stability
int autocvar_g_playerstats_balance_maxdifference
int autocvar_g_playerstats_balance_scorefactor
string autocvar_g_playerstats_balance_uri
float autocvar_g_playerstats_balance_sigmarange
const string PLAYERSTATS_ALIVETIME
#define PlayerStats_GameReport_Event_Player(ent, eventid, val)
bool RadarMap_Make(int argc)
#define AVAILABLE_TEAMS
Number of teams that exist currently.
void CampaignLevelWarp(float n)
void PutObserverInServer(entity this, bool is_forced, bool use_spawnpoint)
putting a client as observer in the server
entity GetIndexedEntity(int argc, int start_index)
int VerifyClientEntity(entity client, bool must_be_real, bool must_be_bots)
string GetCallerName(entity caller)
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)
#define SERVER_COMMAND(id, description)
string ValidateMap(string validated_map, entity caller)
void ReadyRestart(bool forceWarmupEnd)
#define PlayerScore_Get(player, scorefield)
Returns the player's score.
void anticheat_report_to_eventlog(entity this)
ERASEABLE string car(string s)
Returns first word.
ERASEABLE string cdr(string s)
Returns all but first word.
void GameCommand_stuffto(int request, int argc)
void GameCommand_effectindexdump(int request)
void GameCommand_cointoss(int request, int argc)
void GameCommand_unlockteams(int request)
void GameCommand_radarmap(int request, int argc)
void GameCommand_delrec(int request, int argc)
void GameCommand_gotomap(int request, int argc)
void GameCommand_allready(int request)
float GameCommand_macro_command(int argc, string command)
void GameCommand_resetmatch(int request)
void print_Effect_Index(int d, string effect_name)
void GameCommand_animbench(int request, int argc)
void changematchtime(float delta, float mi, float ma)
void GameCommand_balanceteams(int request, int argc)
void GameCommand_database(int request, int argc)
void GameCommand_bbox(int request)
void GameCommand_defer_clear_all(int request)
void balanceteams_handler(entity fh, entity p, float status)
void GameCommand_extendmatchtime(int request)
void GameCommand_setbots(int request, int argc)
void make_mapinfo_Think(entity this)
void GameCommand_make_mapinfo(int request)
void GameCommand_shuffleteams(int request)
void GameCommand_gettaginfo(int request, int argc)
void GameCommand_lockteams(int request)
void GameCommand_nospectators(int request)
void GameCommand_warp(int request, int argc)
void GameCommand_allspec(int request, int argc)
void GameCommand_bot_cmd(int request, int argc, string command)
void GameCommand_adminmsg(int request, int argc)
void GameCommand_nextmap(int request, int argc)
void GameCommand_anticheat(int request, int argc)
void GameCommand_moveplayer(int request, int argc)
void GameCommand_reducematchtime(int request)
void GameCommand(string command)
void GameCommand_macro_help()
float GameCommand_macro_usage(int argc)
void GameCommand_defer_clear(int request, int argc)
void GameCommand_gametype(int request, int argc)
void GameCommand_macro_write_aliases(float fh)
void GameCommand_printstats(int request)
void GameCommand_trace(int request, int argc)
bool shuffleteams_on_reset_map
bool balanceteams_on_reset_map
void race_deleteTime(string map, float pos)
bool GameTypeVote_SetGametype(Gametype type, string gametype_string, bool call_hooks)
int Entity_GetTeamIndex(entity this)
Returns the team index of the given entity.
void TeamBalance_Destroy(entity balance)
Destroy the team balance entity.
bool Player_HasRealForcedTeam(entity player)
Returns whether player has real forced team.
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_FindBestTeam(entity balance, entity player, bool ignore_player)
Finds the team that will make the game most balanced if the player joins it.
bool MoveToTeam(entity client, int team_index, int type)
Moves player to the specified team.
int teamplay_bitmask
The set of currently available teams (AVAILABLE_TEAMS is the number of them).
bool Team_IsValidTeam(int team_num)
Returns whether team value is valid.
int Team_TeamToBit(int team_num)
Converts team value into bit value that is used in team bitmasks.
#define Static_Team_ColorName_Upper(teamid)
int Team_TeamToIndex(int team_num)
Converts team value into team index.
#define Team_ColoredFullName(teamid)
int Team_IndexToTeam(int index)
Converts team index into team value.
const int NUM_TEAMS
Max number of teams that could exist, prefer AVAILABLE_TEAMS.
float Team_ColorToTeam(string team_color)
ERASEABLE string url_fgets(entity e)
ERASEABLE void url_fputs(entity e, string s)
ERASEABLE void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
ERASEABLE void url_fclose(entity e)
const float URL_READY_CLOSED
const float URL_READY_ERROR
const float URL_READY_CANREAD
const float URL_READY_CANWRITE
#define FOREACH_CLIENT_RANDOM(cond, body)
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
entity weaponentities[MAX_WEAPONSLOTS]
void DumpStats(float final)
float autocvar_timelimit_max
float cvar_purechanges_count
float autocvar_timelimit_min
float autocvar_timelimit_decrement
float autocvar_timelimit_increment