15.11.2009, 00:29
The title say it, how to make an 3D speedometer an friend have it but he don't tell it to me can someone help me?
Originally Posted by Dresden
Maybe he's talking about how GetPlayerVelocity only calculates x velocity and y velocity and he wants to know how to get their real velocity?
|
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);
}
Originally Posted by Frikandel
i'm not good in 3D
|