SA-MP Forums Archive
How to convert float to integer or string? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to convert float to integer or string? (/showthread.php?tid=164744)



How to convert float to integer or string? - CoaPsyFactor - 01.08.2010

Hello i don't know how can i convert float to integer or string.
Can anyone help me?


Re: How to convert float to integer or string? - Jefff - 01.08.2010

pawn Код:
printf("* %d - %s",floatround(12.234),"12.234");



Re: How to convert float to integer or string? - Jeffry - 01.08.2010

Use:

pawn Код:
new YourInteger = floatround(/*YourFloat*/, floatround_round);



Re: How to convert float to integer or string? - CoaPsyFactor - 02.08.2010

thanks guys it helped