SHARE
TWEET

No compressors on spawn planet

clark Feb 1st, 2013 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function OnEntitySpawn( ent )
  2.         if ent:GetClass() == "generator_gas" then
  3.                 if game.GetMap() == "sb_vacuum_rc1" then
  4.                         for k, v in pairs(ents.GetAll()) do
  5.                                 if IsValid(v) and v:GetClass() == "base_sb_planet2" and v:GetSize() == 4096 then
  6.                                         if v:GetPos():Distance(ent:GetPos()) <= v:GetSize() then
  7.                                                 ent:Remove() -- Remove the gas compressor.
  8.                                         end
  9.                                 end
  10.                         end
  11.                 end
  12.         end
  13. end
  14. CAF.AddHook("OnEntitySpawn", OnEntitySpawn)
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