22.08.2014, 00:47
How do I convert a distance, from say GetVehicleDistanceFromPoint, to miles?
I know the math formula must lie somewhere in my vehicle speed formula by misco. Just not sure how to pull it out...
Anyone know the formula?
I know the math formula must lie somewhere in my vehicle speed formula by misco. Just not sure how to pull it out...
pawn Код:
stock GetPlayerSpeed(playerid,bool:kmh) // by misco
{
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}