09.09.2014, 16:37
pawn Код:
if(PlayerInfo[playerid][pArmour] == 0)
{
new Float:health =GetPlayerHealth(playerid,health);
SetPlayerHealthEx(playerid,health-amount);
}
else
{
new Float:armour = GetPlayerArmour(playerid,armour);
SetPlayerArmourEx(playerid,armour-amount);
if(PlayerInfo[playerid][pArmour] < 0)
{
new Float:hh =GetPlayerHealth(playerid,hh);
SetPlayerHealthEx(playerid,hh+PlayerInfo[playerid][pArmour]);
PlayerInfo[playerid][pArmour]=0;
}
}
but if i get any amount of damage my health goes to 0.0 (Dead)
and yea pArmour and pHealth are float values