Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- add to the bottom
- function armorDamage(attacker, weapon, part, loss)
- for i=219,221 do
- local found, slot, value = hasItem(source, i)
- if found then
- local newValue = value - math.floor(loss)
- if newValue >= 0 then
- updateItemValue(source, slot, newValue)
- else
- triggerServerEvent("deleteArmor", localPlayer, localPlayer, i, value)
- end
- end
- end
- end
- addEventHandler("onClientPlayerDamage", localPlayer, armorDamage)
Advertisement
Add Comment
Please, Sign In to add comment