30.10.2016, 11:28
I guess you want to do it like this?
That will work just like the default damages. I got a similiar thing in my script as well. :P
Код:
if (Armour[playerid] > amount) Armor[playerid] -= amount; else if (Armour[playerid]) { amount - Armour[playerid]; Armour[playerid] = 0.0; if (amount) { if (Health[playerid] > amount) Health[playerid] -= amount; else Health[playerid] = 0.0; } } else if (Health[playerid] > amount) Health[playerid] -= amount; else Health[playerid] = 0.0;