28 if (caller)
return "cmd";
35 if (caller)
return playername(caller.netname, caller.team,
false);
62 {
return strcat(col,
"Client '", original_input, col,
"' doesn't exist");
65 {
return strcat(col,
"Client '", original_input, col,
"' is not real");
68 {
return strcat(col,
"Client '", original_input, col,
"' is not a bot");
71 {
return "Incorrect usage of GetClientErrorString";
85 int tmp_number, index;
92 if (argc > start_index)
101 tmp_number =
stof(tmp_string);
103 else if (argc > index)
121 selection = edict_num(tmp_number);
126 if(strdecolorize(it.netname) == strdecolorize(
argv(start_index)))
133 index = (start_index + 1);
149 else tmp_number =
stof(input);
153 selection = edict_num(tmp_number);
159 if(strdecolorize(it.netname) == strdecolorize(input))
174 else print(input,
"\n");
248 it.lastV_angle = it.v_angle;
286 print_to(caller,
" No arguments required.");
287 print_to(caller,
"See also: ^2cvar_purechanges^7");
307 print_to(caller,
" No arguments required.");
308 print_to(caller,
"See also: ^2cvar_changes^7");
331 string argument =
argv(2);
337 if (!caller) {
print_to(caller,
"Only players can edit monsters");
return; }
338 if (!argument)
break;
341 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
343 string mon_oldname = mon.m_name;
345 mon.m_name = argument;
347 print_to(caller, sprintf(
"Your pet '%s' is now known as '%s'", mon_oldname, mon.m_name));
352 if (!caller) {
print_to(caller,
"Only players can spawn monsters");
return; }
355 int moveflag, tmp_moncount = 0;
368 if (!
IS_PLAYER(caller)) {
print_to(caller,
"You must be playing to spawn a monster");
return; }
370 if (caller.vehicle) {
print_to(caller,
"You can't spawn monsters while driving a vehicle");
return; }
371 if (
IS_DEAD(caller)) {
print_to(caller,
"You can't spawn monsters while dead");
return; }
376 FOREACH(Monsters, it != MON_Null && it.netname == arg_lower,
382 if (!found && arg_lower !=
"random" && arg_lower !=
"anyrandom") {
print_to(caller,
"Invalid monster");
return; }
392 if (!caller) {
print_to(caller,
"Only players can kill monsters");
return; }
394 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
397 print_to(caller,
strcat(
"Your pet '", mon.m_name,
"' has been brutally mutilated"));
402 if (!caller) {
print_to(caller,
"Only players can edit monsters");
return; }
403 if (!argument)
break;
405 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
407 if (mon.monsterdef == MON_MAGE) {
print_to(caller,
"Mage skins can't be changed");
return; }
409 mon.skin =
stof(argument);
415 if (!caller) {
print_to(caller,
"Only players can edit monsters");
return; }
416 if (!argument)
break;
418 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
421 mon.monster_moveflags =
stof(argument);
422 print_to(caller,
strcat(
"Monster move target successfully changed to ",
ftos(mon.monster_moveflags)));
427 if (caller) {
print_to(caller,
"This command is not available to players");
return; }
430 int tmp_remcount = 0;
441 print_to(caller, (tmp_remcount) ? sprintf(
"Killed %d monster%s", tmp_remcount, (tmp_remcount == 1) ?
"" :
"s") :
"No monsters to kill");
451 print_to(caller,
" Where <command> can be butcher spawn skin movetarget kill name");
452 print_to(caller,
" spawn, skin, movetarget and name require <arguments>");
453 print_to(caller,
" spawn also takes arguments list and random");
454 print_to(caller,
" Monster will follow owner if third argument of spawn command is not defined");
469 else print_to(caller,
"ERROR: unsupported info command");
478 print_to(caller,
" Where <request> is the suffixed string appended onto the request for cvar.");
498 print_to(caller,
" No arguments required.");
518 print_to(caller,
" No arguments required.");
538 print_to(caller,
" No arguments required.");
558 print_to(caller,
" No arguments required.");
575 for (
int i = 0; i < 10; ++i)
586 print_to(caller,
" Without arguments it prints all records (all pages) for the current gametype,");
587 print_to(caller,
" otherwise if there are multiple pages it only prints page <pagenum> (1..10),");
607 print_to(caller,
" No arguments required.");
624 print_to(caller,
strcat(
"localtime = ", strftime(
true,
"%a %b %d %H:%M:%S %Z %Y")));
625 print_to(caller,
strcat(
"gmtime = ", strftime(
false,
"%a %b %d %H:%M:%S %Z %Y")));
633 print_to(caller,
" No arguments required.");
650 print_to(caller,
"^7Error: You are not allowed to stop the active timeout.");
675 default:
LOG_TRACE(
"timeout status was inactive, but this code was executed anyway?");
680 else {
print_to(caller,
"^1Timeins are not allowed to be called, enable them with sv_timeout 1.\n"); }
689 print_to(caller,
" No arguments required.");
708 print_to(caller,
"^7Error: You can not call a timeout while a vote is active.");
712 print_to(caller,
"^7Error: You can not call a timeout in warmup-stage.");
716 print_to(caller,
"^7Error: You can not call a timeout while the map is being restarted.");
720 print_to(caller,
"^7Error: You already used all your timeout calls for this map.");
724 print_to(caller,
"^7Error: You must be a player to call a timeout.");
728 print_to(caller,
"^7Error: It is too late to call a timeout now!");
733 if (caller)
CS(caller).allowed_timeouts -= 1;
749 else {
print_to(caller,
"^1Timeouts are not allowed to be called, enable them with sv_timeout 1.\n"); }
758 print_to(caller,
" No arguments required.");
770 float total_listed_players, is_bot;
773 string separator = strreplace(
"%",
" ",
strcat((
argv(1) ?
argv(1) :
" "),
"^7"));
774 string tmp_netaddress, tmp_crypto_idfp;
776 print_to(caller,
strcat(
"List of client information", (privacy ?
" (some data is hidden for privacy)" :
""),
":"));
777 print_to(caller, sprintf(strreplace(
" ", separator,
" %-4s %-20s %-5s %-3s %-9s %-16s %s "),
778 "ent",
"nickname",
"ping",
"pl",
"time",
"ip",
"crypto_id"));
780 total_listed_players = 0;
786 tmp_netaddress =
"null/botclient";
787 tmp_crypto_idfp =
"null/botclient";
791 tmp_netaddress =
"hidden";
792 tmp_crypto_idfp =
"hidden";
796 tmp_netaddress = it.netaddress;
797 tmp_crypto_idfp = it.crypto_idfp;
800 print_to(caller, sprintf(strreplace(
" ", separator,
" #%-3d %-20.20s %-5d %-3d %-9s %-16s %s "),
809 ++total_listed_players;
821 print_to(caller,
" Where <separator> is the optional string to separate the values with, default is a space.");
#define MUTATOR_CALLHOOK(id,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
const int CMD_REQUEST_COMMAND
const int CMD_REQUEST_USAGE
#define autocvar_timelimit
string playername(string thename, int teamid, bool team_colorize)
void wordwrap_sprint(entity to, string s, float l)
string strtolower(string s)
ERASEABLE string process_time(float outputtype, int seconds)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
#define IL_EACH(this, cond, body)
#define IL_CLEAR(this)
Remove all elements.
#define FOREACH(list, cond, body)
void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
void WarpZone_TraceBox(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent)
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)
void Score_NicePrint(entity to)
Prints the scores to the console of a player.
void CommonCommand_cvar_purechanges(int request, entity caller)
void CommonCommand_printmaplist(int request, entity caller)
void CommonCommand_lsmaps(int request, entity caller)
void CommonCommand_editmob(int request, entity caller, int argc)
void print_to(entity to, string input)
void timeout_handler_reset(entity this)
string GetCommandPrefix(entity caller)
void CommonCommand_records(int request, entity caller)
string GetClientErrorString_color(float clienterror, string original_input, string col)
entity GetIndexedEntity(int argc, int start_index)
int VerifyClientEntity(entity client, bool must_be_real, bool must_be_bots)
void CommonCommand_ladder(int request, entity caller)
void CommonCommand_teamstatus(int request, entity caller)
void CommonCommand_timeout(int request, entity caller)
void CommonCommand_who(int request, entity caller, int argc)
void timeout_handler_think(entity this)
void CommonCommand_info(int request, entity caller, int argc)
bool VerifyClientNumber(int num)
void CommonCommand_timein(int request, entity caller)
void CommonCommand_rankings(int request, entity caller)
string GetCallerName(entity caller)
void CommonCommand_cvar_changes(int request, entity caller)
void CommonCommand_time(int request, entity caller)
int VerifyKickableEntity(entity client)
entity GetFilteredEntity(string input)
const float TIMEOUT_INACTIVE
const float TIMEOUT_SLOWMO_VALUE
string autocvar_sv_adminnick
const float CLIENT_ACCEPTABLE
const float CLIENT_NOT_BOT
const float CLIENT_DOESNT_EXIST
bool autocvar_sv_status_privacy
const float TIMEOUT_ACTIVE
const float CLIENT_NOT_REAL
float autocvar_sv_timeout_leadtime
float autocvar_sv_timeout_length
const float TIMEOUT_LEADTIME
float autocvar_sv_timeout_resumetime
ClientState CS(Client this)
void Monster_Remove(entity this)
int totalspawned
number of monsters spawned with mobspawn command
int autocvar_g_monsters_max
float autocvar_g_monsters
bool autocvar_g_monsters_edit
int autocvar_g_monsters_max_perplayer
entity spawnmonster(entity e, string monster, Monster monster_id, entity spawnedby, entity own, vector orig, bool respwn, bool removeifinvalid, int moveflag)
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)
#define CENTER_OR_VIEWOFS(ent)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
void WaypointSprite_UpdateSprites(entity e, entity _m1, entity _m2, entity _m3)
bool autocvar_g_warmup_allow_timeout