SA-MP Forums Archive
What does velocity represents? - 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: What does velocity represents? (/showthread.php?tid=525346)



What does velocity represents? - Swimor - 11.07.2014

When I use GetPlayerVelocity or GetVehicleVelocity, what the numbers represents? (like m/s and km/h)


Re: What does velocity represents? - BroZeus - 11.07.2014

they are not in ms/kmph u need to convert them
like this
pawn Код:
new Float:x,Float:y,Float:z;
GetVehicleVelocity(vehicleid,x,y,z);
YourSpeedInkmph=floatsqroot((x*x)+(y*y)+(z*z))*198;
YourSpeedInMPH=YourSpeedInkmph*0.621371192;
if you find more about this search how to make speedometer samp on ****** and see the tuts they explain more


Re: What does velocity represents? - Swimor - 11.07.2014

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
they are not in ms/kmph u need to convert them
like this
pawn Код:
new Float:x,Float:y,Float:z;
GetVehicleVelocity(vehicleid,x,y,z);
YourSpeedInkmph=floatsqroot((x*x)+(y*y)+(z*z))*198;
YourSpeedInMPH=YourSpeedInkmph*0.621371192;
if you find more about this search how to make speedometer samp on ****** and see the tuts they explain more
I don't want to convert them, I want to know what does the represent?