SHARE
TWEET

Untitled

a guest Mar 29th, 2019 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "x0_i0_position"
  2.  
  3. void main()
  4. {
  5.  
  6.  object oArea = GetArea(OBJECT_SELF);
  7.  int nTrapType =GetLocalInt (OBJECT_SELF, "TrapType");
  8.  string sTag=  GetTag(OBJECT_SELF);
  9.  
  10.  string sOnDisarm = GetLocalString (OBJECT_SELF, "OnDisarm");
  11.  string sOnTrapT = GetLocalString (OBJECT_SELF, "OnTT");
  12.  string sName = GetLocalString (OBJECT_SELF, "Name");
  13.  
  14.  
  15.  
  16. location s =  GetRandomLocation(oArea);
  17. object oSpawnTrap = GetNearestObjectToLocation(OBJECT_TYPE_WAYPOINT, s);
  18. location lSpawnTrap = GetLocation(oSpawnTrap);
  19.  
  20. while (GetIsObjectValid(oSpawnTrap))
  21. {
  22.     if  (GetTag(oSpawnTrap) == sTag)
  23.     {
  24.     object oTrap = CreateTrapAtLocation (nTrapType, lSpawnTrap, 4.0f, sTag, STANDARD_FACTION_HOSTILE, sOnDisarm, sOnTrapT);
  25.     SetName (oTrap, sName);
  26.     }
  27.     oSpawnTrap = GetNextObjectInArea(oArea);
  28. }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top