Advertisement
Guest User

Untitled

a guest
May 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. function teamPrevention( ply, inf, att, amt, dmg )
  2. if att:GetClass() == "prop_physics" then
  3. dmg:ScaleDamage(0)
  4. end
  5.     if ply:IsPlayer() then
  6.         if ply:Team() == TEAM_MAYOR then
  7.             if inf:Team() == TEAM_SWAT or inf:Team() == TEAM_POLICE or inf:Team() == TEAM_CHIEF then
  8.                 dmg:ScaleDamage( 0 )
  9.             end
  10.         end
  11.     end
  12. end
  13. hook.Add("EntityTakeDamage", "teamprevention", teamPrevention )
  14.  
  15. function PhysPickup(ply,ent)
  16. if ply:IsAdmin() then
  17. return true
  18. end
  19. end
  20. hook.Add("PhysgunPickup", "physpick", PhysPickup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement