Advertisement
Guest User

WAC Remove on Death

a guest
Apr 9th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. /*
  2.     Made by NEMESIS
  3.     Need help ? Then contact me on my steam profile.
  4.     http://steamcommunity.com/profiles/76561198056083145
  5. */
  6.  
  7. hook.Add("Think","wac_remove_on_destroy",function()
  8.     for k,v in pairs(ents.FindByClass("wac_*")) do
  9.         if IsValid(v) then
  10.             if (v.engineHealth == nil) then v.engineHealth = 1 -- This is so it dosen't return a nil and spams you with errors
  11.             end
  12.                 if v.engineHealth <= 0 then
  13.                 v:Remove()
  14.                 end
  15.         end
  16.     end
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement