wierd format thingy - 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: wierd format thingy (
/showthread.php?tid=136403)
wierd format thingy -
ExoSanty - 24.03.2010
does anyone know to what the '%.1f ' in this peace:
"~r~Vehicle Health: ~y~
%.1f~n~~r~Vehicle Speed: ~y~%i KmH", VHealth[GetPlayerVehicleID(playerid)]/10,
converts the var in to?
Re: wierd format thingy -
XGh0stz - 25.03.2010
Lets say the actual float is: 46.230553
%.0f = 46
%.1f = 46.2
%.2f = 46.23
Should get the idea of how this works now :P
So basically this is used only to show the important numbers in the float...
Another example, instead of displaying 100.000000, Using %f.1 will only display 100.0
Re: wierd format thingy -
ExoSanty - 25.03.2010
tnx XGh0stz