Round A Variable - 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: Round A Variable (
/showthread.php?tid=361708)
Round A Variable -
BlackAtom - 21.07.2012
Hi! I'm trying to make a digitar speedometer, but I have a problem (below there is my PIECE of code, NOT full)...
I wanted to try this:
GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
format(string, sizeof(string), "Velocita': %f", floatabs(floatround((Velocity[0]+Velocity[1]+Velocity[2])*256,floatround_round)));
But the output string is 0.000000. So I tried many causes: floatabs works properly, but floatround doesn't works properly, it shows always 0.000000 ,with every round method! Why



?
Re: Round A Variable -
[MM]RoXoR[FS] - 22.07.2012
How about using this :
GetPlayerSpeed