Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. local BAP = {}
  2. function BAP.Velocity( ply, ent )
  3.     if not IsValid(ent) then return end
  4.     ent:SetPos(ent:GetPos())
  5. end
  6. function BAP.DMG( ent, dmginfo )
  7.     if not IsValid(ent) then return end
  8.     if ent:IsPlayer() and dmginfo:GetDamageType() == DMG_CRUSH then
  9.         dmginfo:ScaleDamage( 0.0 )
  10.     end
  11. end
  12. function BAP.Pickup(ply, ent)
  13.     if not IsValid(ent) then return end
  14.     if ent:GetClass() == "prop_physics" then
  15.         ent:SetCollisionGroup( COLLISION_GROUP_DEBRIS )
  16.     end
  17. end
  18. function BAP.Drop(ply, ent)
  19.     if not IsValid(ent) then return end
  20.     if ent:GetClass() == "prop_physics" then
  21.         ent:SetCollisionGroup( COLLISION_GROUP_NONE )
  22.     end
  23. end
  24. function BAP.FreezeIt(wep, phys, ent, ply)
  25.     if not IsValid(ent) then return end
  26.     if ent:GetClass() == "prop_physics" then
  27.         ent:SetCollisionGroup( COLLISION_GROUP_NONE )
  28.     end
  29. end
  30. hook.Add("PhysgunDrop", "BAP_AntiVelocity", BAP.Velocity)
  31. hook.Add("EntityTakeDamage", "BAP_AntiDMG", BAP.DMG)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement