Advertisement
Johurt

[FNC] GetVehicleSpeed

Oct 13th, 2012
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.27 KB | None | 0 0
  1. stock GetVehicleSpeed(vehicleid)
  2. {
  3.     new Float:ST[4];
  4.     GetVehicleVelocity(vehicleid, ST[0], ST[1], ST[2]);
  5.     ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 195.0;
  6.     return floatround(ST[3]);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement