SA-MP Forums Archive
Armour Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Armour Problem (/showthread.php?tid=594770)



Armour Problem - IzadorO - 22.11.2015

I have a custom damage script, which uses OnPlayerTakeDamage and then applies whatever damage I've scripted it to apply. The problem is, if say, a player's armour is 50, and their armour is damaged until it reaches 0, it then resets and their armour is restored to 100. Any idea how to fix this?

EDIT: Never mind. Just set their armour to 0 instead of decreasing it, if their armour is at or below the damage amount.

This can be locked.