Float to integer? - 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: Float to integer? (
/showthread.php?tid=528347)
Float to integer? -
Beckett - 27.07.2014
I've tried to to do this but leads me into a tag mismatch.
pawn Код:
new Float:hp = GetPlayerHealthEx(playerid),string[10];
hp = floatround(hp,floatround_round);
new integer:i;
i = hp;
format(string,sizeof(string),"%i",i);
TextDrawSetString(Text:hptxt,string);
Re: Float to integer? -
Stinged - 27.07.2014
pawn Код:
new Float:hp, string[10];
GetPlayerHealth(playerid, hp);
format(string, sizeof (string), "%i", floatround(hp, floatround_round);
TextDrawSetString(Text:hptxt, string);
Re: Float to integer? -
Beckett - 27.07.2014
Thank you.