alias anticheat "qc_cmd_sv anticheat ${* ?}" // Create an anticheat report for a client
alias bbox "qc_cmd_sv bbox ${* ?}" // Print detailed information about world size
alias bot_cmd "qc_cmd_sv bot_cmd ${* ?}" // Control and send commands to bots
-alias butcher "qc_cmd_sv butcher ${* ?}" // Remove all monsters on the map
alias cointoss "qc_cmd_sv cointoss ${* ?}" // Flip a virtual coin and give random result
alias database "qc_cmd_sv database ${* ?}" // Extra controls of the serverprogs database
alias defer_clear "qc_cmd_sv defer_clear ${* ?}" // Clear all queued defer commands for a specific client
alias gotomap "qc_cmd_sv gotomap ${* ?}" // Simple command to switch to another map
alias lockteams "qc_cmd_sv lockteams ${* ?}" // Disable the ability for players to switch or enter teams
alias make_mapinfo "qc_cmd_sv make_mapinfo ${* ?}" // Automatically rebuild mapinfo files
+alias mobbutcher "qc_cmd_sv mobbutcher ${* ?}" // Remove all monsters on the map
alias moveplayer "qc_cmd_sv moveplayer ${* ?}" // Change the team/status of a player
alias nospectators "qc_cmd_sv nospectators ${* ?}" // Automatically remove spectators from a match
alias playerdemo "qc_cmd_sv playerdemo ${* ?}" // Control the ability to save demos of players
{
case CMD_REQUEST_COMMAND:
{
- makevectors(self.v_angle);
- WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
-
- if(!(trace_ent.flags & FL_MONSTER)) { sprint(self, "You need to aim at your monster to edit its properties.\n"); return; }
- if(trace_ent.realowner != self) { sprint(self, "That monster does not belong to you.\n"); return; }
-
- switch(argv(1))
+ if(argv(1) && argv(2))
{
- case "skin": if(trace_ent.monsterid != MON_MAGE) { trace_ent.skin = stof(argv(2)); } return;
- case "movetarget": trace_ent.monster_moveflags = stof(argv(2)); return;
+ makevectors(self.v_angle);
+ WarpZone_TraceLine(self.origin + self.view_ofs, self.origin + self.view_ofs + v_forward * 100, MOVE_NORMAL, self);
+
+ if(!(trace_ent.flags & FL_MONSTER)) { sprint(self, "You need to aim at your monster to edit its properties.\n"); }
+ else if(trace_ent.realowner != self) { sprint(self, "That monster does not belong to you.\n"); }
+ else // all went well, continue
+ {
+ switch(argv(1))
+ {
+ case "skin":
+ {
+ if(trace_ent.monsterid != MON_MAGE)
+ trace_ent.skin = stof(argv(2));
+ break;
+ }
+ case "movetarget":
+ {
+ trace_ent.monster_moveflags = stof(argv(2));
+ break;
+ }
+ }
+ }
}
}
default:
if(autocvar_g_monsters_max <= 0 || autocvar_g_monsters_max_perplayer <= 0) { sprint(self, "Monster spawning is disabled.\n"); }
else if(!IS_PLAYER(self)) { sprint(self, "You can't spawn monsters while spectating.\n"); }
+ else if(tospawn == "") { sprint(self, "No argument specified.\n"); }
else if(g_invasion) { sprint(self, "You can't spawn monsters during an invasion!\n"); }
else if(!autocvar_g_monsters) { Send_Notification(NOTIF_ONE, self, MSG_INFO, INFO_MONSTERS_DISABLED); }
else if(self.vehicle) { sprint(self, "You can't spawn monsters while driving a vehicle.\n"); }
sprint(self, "Incorrect parameters for ^2mobspawn^7\n");
case CMD_REQUEST_USAGE:
{
- sprint(self, "\nUsage:^3 cmd mobspawn monster\n");
+ sprint(self, "\nUsage:^3 cmd mobspawn <random> <monster> [movetype]\n");
sprint(self, " See 'cmd mobspawn list' for available arguments.\n");
- sprint(self, " Argument 'random' spawns a randomly selected monster.\n");
+ sprint(self, " Argument 'random' spawns a random monster.\n");
+ sprint(self, " Monster will follow the owner if second argument is not defined.\n");
return;
}
}
}
}
-void GameCommand_butcher(float request)
+void GameCommand_mobbutcher(float request)
{
switch(request)
{
// Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
#define SERVER_COMMANDS(request,arguments,command) \
SERVER_COMMAND("adminmsg", GameCommand_adminmsg(request, arguments), "Send an admin message to a client directly") \
- SERVER_COMMAND("butcher", GameCommand_butcher(request), "Instantly removes all monsters on the map") \
+ SERVER_COMMAND("mobbutcher", GameCommand_mobbutcher(request), "Instantly removes all monsters on the map") \
SERVER_COMMAND("allready", GameCommand_allready(request), "Restart the server and reset the players") \
SERVER_COMMAND("allspec", GameCommand_allspec(request, arguments), "Force all players to spectate") \
SERVER_COMMAND("anticheat", GameCommand_anticheat(request, arguments), "Create an anticheat report for a client") \