13.11.2011, 11:16
I saw many speedo meter scripts, they all dont work well, they show less speed even when i am going fast
the function being used is
the function being used is
Код:
stock GetPlayerSpeedSpeedo(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); }