Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ITEM.Name = 'Wubber Boots'
- ITEM.Price = 10000
- ITEM.Material = 'vgui/ttt/icon_fall.vmt'
- ITEM.Bone = 'ValveBiped.Bip01_Spine2'
- local ShouldRecieveFallDamage
- function ITEM:OnEquip(ply, modifications)
- ply:PS_AddClientsideModel(self.ID)
- ply.ShouldRecieveFallDamage = true
- end
- function ITEM:OnHolster(ply)
- ply:PS_RemoveClientsideModel(self.ID)
- ply.ShouldRecieveFallDamage = false
- end
- function ITEM:ModifyClientsideModel(ply, model, pos, ang)
- model:SetModelScale(0, 0)
- pos = pos + (ang:Right() * 7) + (ang:Forward() * 6)
- return model, pos, ang
- end
- local function ReduceFallDamage(ent, dmginfo)
- if ent:IsPlayer() and ent.ShouldRecieveFallDamage and dmginfo:IsFallDamage() then
- dmginfo:ScaleDamage(0)
- end
- end
- hook.Add("EntityTakeDamage", "ReduceFallDamage", ReduceFallDamage)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement