{
entity e;
string tospawn;
- float moveflag, i;
+ float moveflag;
moveflag = (argv(2) ? stof(argv(2)) : 1); // follow owner if not defined
tospawn = strtolower(argv(1));
return;
}
- if(tospawn == "random")
- {
- RandomSelection_Init();
- for(i = MON_FIRST; i <= MON_LAST; ++i)
- RandomSelection_Add(world, 0, (get_monsterinfo(i)).netname, 1, 1);
-
- tospawn = RandomSelection_chosen_string;
- }
-
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(g_invasion) { sprint(self, "You can't spawn monsters during an invasion!\n"); }