18.12.2010, 02:36
I'll give you a small function, maybe you will use it:
It returns the vehicle speed in kmp/h.
pawn Код:
stock
GetVehicleSpeed(vehicleid)
{
new
Float: x,
Float: y,
Float: z;
GetVehicleVelocity(vehicleid, x, y, z);
return floatround((floatmul(floatsqroot(floatpower(x, 2.0) + floatpower(y, 2.0) + floatpower(z, 2.0)), 100.0) / 0.4463), floatround_floor);
}