Coding Help

Can someone help me make it so that instead of taking all fall dmg away, to just take off a percentage.

ITEM.Name = ‘Iron Boots’
ITEM.Price = 5000
ITEM.Model = ‘models/xqm/helicopterrotorhuge.mdl’ --Temporary until boot model is added, this is just for fun.
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

As far as I can tell you just replace the 0 in this line:


dmginfo:ScaleDamage(0)

with any number you want to use.
10% reduction (90% damage) = 0.9
10% damage (90% reduction) = 0.1

Also please use code tags in the future.

alright ill try that, thanks

-snip-
For your code to work, you need to hook the function to a hook.