Deduct HP instead of setting it to a negative point
#3

Make sure the value doesn't go negative aswel:

pawn Код:
new Float:hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, (hp - 60 >= 0) ? (hp - 60) : 0);
Reply


Messages In This Thread
Deduct HP instead of setting it to a negative point - by 69 - 03.12.2012, 19:05
Re: Deduct HP instead of setting it to a negative point - by DaRk_RaiN - 03.12.2012, 19:10
Re: Deduct HP instead of setting it to a negative point - by Sinner - 03.12.2012, 19:28

Forum Jump:


Users browsing this thread: 1 Guest(s)