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";
79 if ((tmp_number < 1) || (tmp_number >
maxclients))
return false;
86 float tmp_number, index;
93 if (argc > start_index)
100 if (tmp_string !=
"")
102 tmp_number =
stof(tmp_string);
104 else if (argc > index)
122 selection = edict_num(tmp_number);
127 if(strdecolorize(it.netname) == strdecolorize(
argv(start_index)))
134 index = (start_index + 1);
150 else tmp_number =
stof(input);
154 selection = edict_num(tmp_number);
160 if(strdecolorize(it.netname) == strdecolorize(input))
175 else print(input,
"\n");
194 switch (timeout_status)
200 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_TIMEOUT_ENDING,
timeout_time);
203 Send_Notification(NOTIF_ALL,
NULL, MSG_ANNCE, ANNCE_PREPARE);
210 Kill_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CPID_TIMEIN);
245 it.nickspamcount = it.nickspamtime = it.floodcontrol_chat =
246 it.floodcontrol_chatteam = it.floodcontrol_chattell =
247 it.floodcontrol_voice = it.floodcontrol_voiceteam = 0;
252 it.lastV_angle = it.v_angle;
290 print_to(caller,
" No arguments required.");
291 print_to(caller,
"See also: ^2cvar_purechanges^7");
311 print_to(caller,
" No arguments required.");
312 print_to(caller,
"See also: ^2cvar_changes^7");
335 string argument =
argv(2);
341 if (!caller) {
print_to(caller,
"Only players can edit monsters");
return; }
342 if (!argument)
break;
345 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
347 string mon_oldname = mon.monster_name;
349 mon.monster_name = argument;
350 if (mon.sprite) WaypointSprite_UpdateSprites(mon.sprite, WP_Monster, WP_Null, WP_Null);
351 print_to(caller, sprintf(
"Your pet '%s' is now known as '%s'", mon_oldname, mon.monster_name));
356 if (!caller) {
print_to(caller,
"Only players can spawn monsters");
return; }
359 int moveflag, tmp_moncount = 0;
360 string arg_lower = strtolower(argument);
363 if (arg_lower ==
"list") {
print_to(caller, monsterlist_reply);
return; }
372 if (!
IS_PLAYER(caller)) {
print_to(caller,
"You must be playing to spawn a monster");
return; }
374 if (caller.vehicle) {
print_to(caller,
"You can't spawn monsters while driving a vehicle");
return; }
375 if (STAT(FROZEN, caller)) {
print_to(caller,
"You can't spawn monsters while frozen");
return; }
376 if (
IS_DEAD(caller)) {
print_to(caller,
"You can't spawn monsters while dead");
return; }
381 FOREACH(Monsters, it != MON_Null && it.netname == arg_lower,
387 if (!found && arg_lower !=
"random" && arg_lower !=
"anyrandom") {
print_to(caller,
"Invalid monster");
return; }
397 if (!caller) {
print_to(caller,
"Only players can kill monsters");
return; }
399 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
402 print_to(caller,
strcat(
"Your pet '", mon.monster_name,
"' has been brutally mutilated"));
407 if (!caller) {
print_to(caller,
"Only players can edit monsters");
return; }
408 if (!argument)
break;
410 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
412 if (mon.monsterdef == MON_MAGE) {
print_to(caller,
"Mage skins can't be changed");
return; }
414 mon.skin =
stof(argument);
420 if (!caller) {
print_to(caller,
"Only players can edit monsters");
return; }
421 if (!argument)
break;
423 if (!is_visible) {
print_to(caller,
"You must look at your monster to edit it");
return; }
426 mon.monster_moveflags =
stof(argument);
427 print_to(caller,
strcat(
"Monster move target successfully changed to ",
ftos(mon.monster_moveflags)));
432 if (caller) {
print_to(caller,
"This command is not available to players");
return; }
435 int tmp_remcount = 0;
446 print_to(caller, (tmp_remcount) ? sprintf(
"Killed %d monster%s", tmp_remcount, (tmp_remcount == 1) ?
"" :
"s") :
"No monsters to kill");
456 print_to(caller,
" Where <command> can be butcher spawn skin movetarget kill name");
457 print_to(caller,
" spawn, skin, movetarget and name require <arguments>");
458 print_to(caller,
" spawn also takes arguments list and random");
459 print_to(caller,
" Monster will follow owner if third argument of spawn command is not defined");
473 if (command) wordwrap_sprint(caller, command, 1000);
474 else print_to(caller,
"ERROR: unsupported info command");
483 print_to(caller,
" Where <request> is the suffixed string appended onto the request for cvar.");
503 print_to(caller,
" No arguments required.");
523 print_to(caller,
" No arguments required.");
543 print_to(caller,
" No arguments required.");
563 print_to(caller,
" No arguments required.");
576 if(num > 0 && num <= 10 && records_reply[num - 1] !=
"")
577 print_to(caller, records_reply[num - 1]);
580 for (
int i = 0; i < 10; ++i)
581 if (records_reply[i] !=
"")
print_to(caller, records_reply[i]);
591 print_to(caller,
" Without arguments it prints all records (all pages) for the current gametype,");
592 print_to(caller,
" otherwise if there are multiple pages it only prints page <pagenum> (1..10),");
612 print_to(caller,
" No arguments required.");
629 print_to(caller,
strcat(
"localtime = ", strftime(
true,
"%a %b %d %H:%M:%S %Z %Y")));
630 print_to(caller,
strcat(
"gmtime = ", strftime(
false,
"%a %b %d %H:%M:%S %Z %Y")));
638 print_to(caller,
" No arguments required.");
652 if (!timeout_status) {
print_to(caller,
"^7Error: There is no active timeout called."); }
655 print_to(caller,
"^7Error: You are not allowed to stop the active timeout.");
660 switch (timeout_status)
667 Kill_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CPID_TIMEOUT);
680 default:
LOG_TRACE(
"timeout status was inactive, but this code was executed anyway?");
685 else {
print_to(caller,
"^1Timeins are not allowed to be called, enable them with sv_timeout 1.\n"); }
694 print_to(caller,
" No arguments required.");
710 if (timeout_status) {
print_to(caller,
"^7Error: A timeout is already active."); }
713 print_to(caller,
"^7Error: You can not call a timeout while a vote is active.");
717 print_to(caller,
"^7Error: You can not call a timeout in warmup-stage.");
719 else if (
time < game_starttime)
721 print_to(caller,
"^7Error: You can not call a timeout while the map is being restarted.");
725 print_to(caller,
"^7Error: You already used all your timeout calls for this map.");
729 print_to(caller,
"^7Error: You must be a player to call a timeout.");
731 else if ((autocvar_timelimit) && (last_possible_timeout <
time - game_starttime))
733 print_to(caller,
"^7Error: It is too late to call a timeout now!");
738 if (caller)
CS(caller).allowed_timeouts -= 1;
751 Send_Notification(NOTIF_ALL,
NULL, MSG_ANNCE, ANNCE_TIMEOUT);
754 else {
print_to(caller,
"^1Timeouts are not allowed to be called, enable them with sv_timeout 1.\n"); }
763 print_to(caller,
" No arguments required.");
775 float total_listed_players, is_bot;
778 string separator = strreplace(
"%",
" ",
strcat((
argv(1) ?
argv(1) :
" "),
"^7"));
779 string tmp_netaddress, tmp_crypto_idfp;
781 print_to(caller,
strcat(
"List of client information", (privacy ?
" (some data is hidden for privacy)" :
""),
":"));
782 print_to(caller, sprintf(strreplace(
" ", separator,
" %-4s %-20s %-5s %-3s %-9s %-16s %s "),
783 "ent",
"nickname",
"ping",
"pl",
"time",
"ip",
"crypto_id"));
785 total_listed_players = 0;
791 tmp_netaddress =
"null/botclient";
792 tmp_crypto_idfp =
"null/botclient";
796 tmp_netaddress =
"hidden";
797 tmp_crypto_idfp =
"hidden";
801 tmp_netaddress = it.netaddress;
802 tmp_crypto_idfp = it.crypto_idfp;
805 print_to(caller, sprintf(strreplace(
" ", separator,
" #%-3d %-20.20s %-5d %-3d %-9s %-16s %s "),
814 ++total_listed_players;
826 print_to(caller,
" Where <separator> is the optional string to separate the values with, default is a space.");
bool autocvar_g_monsters_edit
string GetClientErrorString_color(float clienterror, string original_input, string col)
#define IL_EACH(this, cond, body)
void CommonCommand_time(int request, entity caller)
void CommonCommand_printmaplist(int request, entity caller)
entity spawnmonster(entity e, string monster, Monster monster_id, entity spawnedby, entity own, vector orig, bool respwn, bool removeifinvalid, int moveflag)
entity GetIndexedEntity(int argc, float start_index)
#define IL_CLEAR(this)
Remove all elements.
const float CLIENT_NOT_BOT
string GetCommandPrefix(entity caller)
float autocvar_sv_timeout_length
const int CMD_REQUEST_USAGE
void Score_NicePrint(entity to)
Prints the scores to the console of a player.
void WarpZone_TraceBox(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent)
void timeout_handler_think(entity this)
bool autocvar_g_warmup_allow_timeout
float autocvar_sv_timeout_leadtime
bool autocvar_sv_status_privacy
ClientState CS(Client this)
#define FOREACH_CLIENT(cond, body)
void CommonCommand_info(int request, entity caller, int argc)
float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
int autocvar_g_monsters_max
ERASEABLE string process_time(float outputtype, int seconds)
string autocvar_sv_adminnick
void print_to(entity to, string input)
void CommonCommand_lsmaps(int request, entity caller)
void CommonCommand_rankings(int request, entity caller)
const float TIMEOUT_ACTIVE
void CommonCommand_records(int request, entity caller)
void CommonCommand_timeout(int request, entity caller)
void CommonCommand_editmob(int request, entity caller, int argc)
const float CLIENT_ACCEPTABLE
const float TIMEOUT_SLOWMO_VALUE
entity GetFilteredEntity(string input)
const float CLIENT_DOESNT_EXIST
#define IS_REAL_CLIENT(v)
int autocvar_g_monsters_max_perplayer
const float TIMEOUT_INACTIVE
float autocvar_g_monsters
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
float autocvar_sv_timeout_resumetime
float VerifyClientNumber(float tmp_number)
const int CMD_REQUEST_COMMAND
void Monster_Remove(entity this)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
string GetCallerName(entity caller)
void CommonCommand_timein(int request, entity caller)
#define CENTER_OR_VIEWOFS(ent)
int totalspawned
number of monsters spawned with mobspawn command
void CommonCommand_who(int request, entity caller, int argc)
const float CLIENT_NOT_REAL
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void CommonCommand_ladder(int request, entity caller)
const float TIMEOUT_LEADTIME
void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
#define MUTATOR_CALLHOOK(id,...)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
void timeout_handler_reset(entity this)
void CommonCommand_cvar_purechanges(int request, entity caller)
#define FOREACH(list, cond, body)
void CommonCommand_cvar_changes(int request, entity caller)
float VerifyKickableEntity(entity client)
void CommonCommand_teamstatus(int request, entity caller)