Guest User

Untitled

a guest
Oct 11th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. stock GetPlayerSpeed(playerid,bool:kmh) // by misco
  2. {
  3. new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
  4. if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
  5. rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
  6. return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
  7. }
Add Comment
Please, Sign In to add comment