Velocity - 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: Velocity (
/showthread.php?tid=344615)
Velocity -
2KY - 21.05.2012
Using the following code, I was looking forward to learning how velocity works in SA:MP.
pawn Код:
SetTimer("OneSecond", 1000, true );
forward OneSecond( playerid );
public OneSecond ( playerid )
{
new Float:X, Float:Y, Float:Z, str[128];
GetVehicleVelocity( GetPlayerVehicleID(playerid), X, Y, Z );
format(str,128,"X: %f, Y: %f, Z: %f", X, Y, Z);
return SendClientMessage( playerid, -1, str);
}
To my suprise, a higher speed does not necessarily mean a higher velocity. Can anybody explain to me how velocity works in the GTA engine?
Re: Velocity -
Jonny5 - 21.05.2012
i dont know anything about this but i have read the wiki
http://en.wikipedia.org/wiki/Velocity
says it measures both speed and direction,
that link might help hopefully.
Re: Velocity -
Vince - 21.05.2012
Velocity = Distance / Time.