Vehicle speed
#1

Hey I got a stock for vehicle speed but at Turismo it shows only 177kmh when car like that should reach around 230 kmh?

Here is the stock to get Speed but I don't like when turismo reaches only 177 kmh
how to raise that speed?

pawn Код:
stock GetVehicleSpeed(playerid, bool:kmh = true)
{
    new
        Float:xx,
        Float:yy,
        Float:zz,
        Float:pSpeed;

    if(IsPlayerInAnyVehicle(playerid))
    {
        GetVehicleVelocity(GetPlayerVehicleID(playerid),xx,yy,zz);
    }
    else
    {
        GetPlayerVelocity(playerid,xx,yy,zz);
    }

    pSpeed = floatsqroot((xx * xx) + (yy * yy) + (zz * zz));
    return kmh ? floatround((pSpeed * 165.12)) : floatround((pSpeed * 136.666667));
}
Reply
#2

To raise the speed it returns, you can just make the numbers in the calculation bigger.
So instead of using 165.12 and 136.666667, you could use something like 220 and 136.7.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)