Why?SetPlayerHealth and Armour problem
#1

SetPlayerHealth(playerid,5000)
and
new Float:health;
GetPlayerHealth(playerid,health);
new string[128];
format(string,sizeof(string),"health:%.0f",health) ;
SendCliendMessage(playerid,COLOR_RED,string);

it showed 136 not 5000……
that is a big problem with my 3dlabel display

any idea?
Reply
#2

You can't have a health from 5000, lol :P
A full healthbar uses 100.0, not more. 136 will be the maximum, but with 100 your healthbar will be full.
And you're using an integer at SetPlayerHealth, maybe it's better to use a float.
SetPlayerHealth(playerid, 100.0);
Reply
#3

Quote:
Originally Posted by Remi-X
And you're using an integer at SetPlayerHealth, maybe it's better to use a float.
Not in 0.3 version.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)