is the random player's health is: 153546489? LOL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: is the random player's health is: 153546489? LOL (
/showthread.php?tid=630081)
is the random player's health is: 153546489? LOL -
RyderX - 08.03.2017
Hello there! i have been trying to make textdraw which it got the amount of player's health and got this

:
What if that is the random player's health? LMAO
PHP код:
public OnPlayerUpdate(playerid)
{
new string7[20];
new Float: Health;
GetPlayerHealth(playerid, Health);
format(string7, sizeof(string7), "%d", Health);
TextDrawSetString(Textdraw14[playerid], string7);
TextDrawShowForPlayer(playerid, Textdraw14[playerid]);
new string8[120];
new Float: Armour;
GetPlayerArmour(playerid, Armour);
format(string8, sizeof(string8), "%d", Armour);
TextDrawSetString(Textdraw15[playerid], string8);
TextDrawShowForPlayer(playerid, Textdraw15[playerid]);
return 1;
}
Re: is the random player's health is: 153546489? LOL -
Djole1337 - 08.03.2017
Quote:
Originally Posted by RyderX
Hello there! i have been trying to make textdraw which it got the amount of player's health and got this  :
What if that is the random player's health? LMAO
PHP код:
public OnPlayerUpdate(playerid)
{
new string7[20];
new [B]Float[/B]: Health;
GetPlayerHealth(playerid, Health);
format(string7, sizeof(string7), "%d", Health);
TextDrawSetString(Textdraw14[playerid], string7);
TextDrawShowForPlayer(playerid, Textdraw14[playerid]);
new string8[120];
new [B]Float[/B]: Armour;
GetPlayerArmour(playerid, Armour);
format(string8, sizeof(string8), "%d", Armour);
TextDrawSetString(Textdraw15[playerid], string8);
TextDrawShowForPlayer(playerid, Textdraw15[playerid]);
return 1;
}
|
4char123
Re: is the random player's health is: 153546489? LOL -
4D1L - 08.03.2017
Shouldn't you be using %f instead of %d for floats?
Re: is the random player's health is: 153546489? LOL -
RyderX - 08.03.2017
Quote:
Originally Posted by 4D1L
Shouldn't you be using %f instead of %d for floats?
|
Ouch! F

k this typo thanks nigger