make the "no_spam" infokey disable setting detpacks, not just buying them

This commit is contained in:
Adam Olsen 2001-07-25 17:03:53 +00:00
parent cbe175461b
commit 25446fd860
2 changed files with 11 additions and 1 deletions

View file

@ -157,6 +157,11 @@ void(float timer) TeamFortress_SetDetpack =
if (self.ammo_detpack <= 0)
return;
if (infokey (world, "no_spam") == "on")
{
sprint(self,PRINT_HIGH,"The admin has disabled spam devices on this map.\n");
return;
}
// Cant set detpack if you're in the air
if (!(self.flags & FL_ONGROUND))
{

View file

@ -116,7 +116,12 @@ void() SwitchFromCamera =
void() PrimeC4Det =
{
local entity te;
if (infokey (world, "no_spam") == "on")
{
sprint(self,PRINT_HIGH,"The admin has disabled spam devices on this map.\n");
return;
}
if (!(self.cutf_items & CUTF_TOSSABLEDET))
{
sprint (self, PRINT_HIGH, "You do not have the C4 tossable detpack.\n");