next_token = -1;
index = start_index;
- selection = world;
+ selection = NULL;
if (argc > start_index)
{
}
else
{
- selection = world;
+ selection = NULL;
FOREACH_CLIENT(true, LAMBDA(
if(strdecolorize(it.netname) == strdecolorize(input))
{
{
if (timeout_time > 0) // countdown is still going
{
- Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_TIMEOUT_ENDING, timeout_time);
+ Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_TIMEOUT_ENDING, timeout_time);
if (timeout_time == autocvar_sv_timeout_resumetime) // play a warning sound when only <sv_timeout_resumetime> seconds are left
- Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_PREPARE);
+ Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_PREPARE);
- self.nextthink = time + TIMEOUT_SLOWMO_VALUE; // think again in one second
+ this.nextthink = time + TIMEOUT_SLOWMO_VALUE; // think again in one second
timeout_time -= 1; // decrease the time counter
}
else // time to end the timeout
{
if (timeout_leadtime > 0) // countdown is still going
{
- Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_TIMEOUT_BEGINNING, timeout_leadtime);
+ Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_TIMEOUT_BEGINNING, timeout_leadtime);
- self.nextthink = time + 1; // think again in one second
+ this.nextthink = time + 1; // think again in one second
timeout_leadtime -= 1; // decrease the time counter
}
else // time to begin the timeout
it.lastV_angle = it.v_angle;
));
- self.nextthink = time; // think again next frame to handle it under TIMEOUT_ACTIVE code
+ this.nextthink = time; // think again next frame to handle it under TIMEOUT_ACTIVE code
}
return;
int moveflag, tmp_moncount = 0;
string arg_lower = strtolower(argument);
moveflag = (argv(3)) ? stof(argv(3)) : 1; // follow owner if not defined
- ret_string = "Monster spawning is currently disabled by a mutator";
if (arg_lower == "list") { print_to(caller, monsterlist_reply); return; }
if (!autocvar_g_monsters) { print_to(caller, "Monsters are disabled"); return; }
if (autocvar_g_monsters_max <= 0 || autocvar_g_monsters_max_perplayer <= 0) { print_to(caller, "Monster spawning is disabled"); return; }
if (!IS_PLAYER(caller)) { print_to(caller, "You must be playing to spawn a monster"); return; }
- if (MUTATOR_CALLHOOK(AllowMobSpawning)) { print_to(caller, ret_string); return; }
+ if (MUTATOR_CALLHOOK(AllowMobSpawning, caller)) { print_to(caller, M_ARGV(1, string)); return; }
if (caller.vehicle) { print_to(caller, "You can't spawn monsters while driving a vehicle"); return; }
if (STAT(FROZEN, caller)) { print_to(caller, "You can't spawn monsters while frozen"); return; }
if (IS_DEAD(caller)) { print_to(caller, "You can't spawn monsters while dead"); return; }
if (mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
if (!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
- Damage(mon, world, world, mon.health + mon.max_health + 200, DEATH_KILL.m_id, mon.origin, '0 0 0');
+ Damage(mon, NULL, NULL, mon.health + mon.max_health + 200, DEATH_KILL.m_id, mon.origin, '0 0 0');
print_to(caller, strcat("Your pet '", mon.monster_name, "' has been brutally mutilated"));
return;
}
case "butcher":
{
if (caller) { print_to(caller, "This command is not available to players"); return; }
- if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFO(ret_string, "\n"); return; }
+ if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFO(M_ARGV(0, string), "\n"); return; }
int tmp_remcount = 0;
setthink(timeout_handler, timeout_handler_think);
timeout_handler.nextthink = time; // always let the entity think asap
- Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_TIMEOUT);
+ Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_TIMEOUT);
}
}
else { print_to(caller, "^1Timeouts are not allowed to be called, enable them with sv_timeout 1.\n"); }