Advertisement
Guest User

wubberboots.lua

a guest
May 10th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. ITEM.Name = 'Wubber Boots'
  2. ITEM.Price = 10000
  3. ITEM.Material = 'vgui/ttt/icon_fall.vmt'
  4. ITEM.Bone = 'ValveBiped.Bip01_Spine2'
  5.  
  6. local ShouldRecieveFallDamage
  7. function ITEM:OnEquip(ply, modifications)
  8. ply:PS_AddClientsideModel(self.ID)
  9. ply.ShouldRecieveFallDamage = true
  10. end
  11.  
  12. function ITEM:OnHolster(ply)
  13. ply:PS_RemoveClientsideModel(self.ID)
  14. ply.ShouldRecieveFallDamage = false
  15. end
  16.  
  17. function ITEM:ModifyClientsideModel(ply, model, pos, ang)
  18. model:SetModelScale(0, 0)
  19. pos = pos + (ang:Right() * 7) + (ang:Forward() * 6)
  20.  
  21. return model, pos, ang
  22. end
  23.  
  24. local function ReduceFallDamage(ent, dmginfo)
  25. if ent:IsPlayer() and ent.ShouldRecieveFallDamage and dmginfo:IsFallDamage() then
  26. dmginfo:ScaleDamage(0)
  27. end
  28. end
  29. hook.Add("EntityTakeDamage", "ReduceFallDamage", ReduceFallDamage)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement