Author Topic: Safe Zones  (Read 3743 times)

Code: [Select]
datablock TriggerData(SafeZone)
{
   tickPeriodMS = 100;
};
function SafeZone::onLeaveTrigger(%this,%trigger,%obj)
{
   messageclient(%obj.client,'',"\c1Entered the \c2Safe Zone");
   %obj.client.isSafe = 1;
}
function SafeZone::onEnterTrigger(%this,%trigger,%obj)
{
   messageclient(%obj.client,'',"\c1Left the \c2Safe Zone");
   %obj.client.isSafe = 0;
}
function SafeZone::onTickTrigger(%this,%trigger, %obj)
{
   Parent::onTickTrigger(%this,%trigger);
}

package SafeZoneToggle {
function serverCmdSelf Delete(%client)
  {
    if(%client.isSafe)
    {
     messageclient("\c1Self Delete is disabled in the \c2Safe Zone.");
    }
    else {
    parent::serverCmdSelf Delete(%client);
       }
   }
   function ProjectileData::Damage(%this, %obj, %col, %fade, %pos, %normal)
   {
      if(%this.isSafe)
      {
         return;
      }
      Parent::Damage(%this, %obj, %col, %fade, %pos, %normal);
   }
   function ProjectileData::radiusDamage(%this, %obj, %col, %fade, %pos, %normal)
   {
      if(%this.isSafe)
      {
         return;
      }
      Parent::radiusDamage(%this, %obj, %col, %fade, %pos, %normal);
   }
   function WeaponImage::onFire(%this,%obj,%slot)
   {
      if(%this.isSafe)
      {
         return;
      }
      Parent::onfire(%this, %obj, %slot);
   }
};activatepackage(SafeZoneToggle);

This will stop people from being killed by projectiles, they can still be killed by radius damage or whatever.

Use that code, protects from all damage, from firing weapons and Self Delete in a "Safe" zone.

Thank you very muchly!  :iceCream:

what command is it and how you use plz tell
« Last Edit: November 06, 2007, 12:17:43 PM by ilnessbug »


It's not a command, it's a trigger you spawn it through F11.

Yeah but what i do in it what i press

F11 - F4 - Mission Objects - Mission - Triggers - Set the pop up menu to Safe Zone and then press ok, A yellow box will spawn at the center point of your screen, Then Press F3 and scale and move it through that.

Dammit, I can't edit my posts. (Yeah, i know, nobody cans..)
So now I have safe zone for suiciding, now I need safe zone for PvP. Moar cookies.  :cookie: :cookie:
I can!
Everywhere!