Getspeed bug?
#1

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
Код:
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);
}
Reply
#2

pawn Код:
return kmh ? floatround((pSpeed * 195.12)) : floatround((pSpeed * 121.9));
That's what I'm using. Tweaked it myself using the values in the handling.dat (Infernus top speed 240 KM/h).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)