Health Float Problem
#3

Quote:
Originally Posted by Alternative112
Посмотреть сообщение
Код:
SetPlayerHealth(playerid,100.0); //SetPlayerHealth wants floats.
new Float:health;
GetPlayerHealth(playerid, health);
new Float:maxhealth;
maxhealth = PlayerInfo[playerid][pHP];
if(maxhealth > 0) return SetPlayerHealth(playerid, health + maxhealth);
Not sure why you're using PlayerInfo[playerid][pHP] in your if statement since you are setting it as the value of maxhealth...Try this. If that doesn't work, try making a separate float for health + maxhealth, and just putting that as the second argument for your SetPlayerHealth.
Thanks but still same problem, I have removed it cause begin think useless feature on gamemode.
Reply


Messages In This Thread
Health Float Problem - by Matz - 25.03.2012, 11:35
Re: Health Float Problem - by Alternative112 - 25.03.2012, 15:17
Re: Health Float Problem - by Matz - 25.03.2012, 15:39

Forum Jump:


Users browsing this thread: 1 Guest(s)