need some info - 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: need some info (
/showthread.php?tid=270486)
need some info -
marrcko - 20.07.2011
hi guys,
I don't know how to explain but:
if I use integer values like 29 and 5, message shows me that ratio of these numbers are 5 but I need that it shows 5.8.
So, how I should do that?
Re: need some info -
Jeffry - 20.07.2011
pawn Код:
printf("%0.2f", float(29)/float(5) );
or:
pawn Код:
new Float:Ratio;
Ratio = float(29)/float(5);
printf("%0.2f", Ratio);
I hope this helps you.
Jeffry
Re: need some info -
marrcko - 20.07.2011
thx it helps.
AW: need some info -
Nero_3D - 20.07.2011
or just
pawn Код:
printf("%0.2f", 29.0 / 5.0);