Speedometer system
#5

I made this to match spookie's Speedometer Mod for San Andreas:
pawn Код:
stock GetVehicleSpeed( vehicleid )
{
    // Function: GetVehicleSpeed( vehicleid )
   
    new
        Float:x,
        Float:y,
        Float:z,
        vel;

    GetVehicleVelocity( vehicleid, x, y, z );
   
    // Always returns the vehicle speed in KM/H
    vel = floatround( floatsqroot( x*x + y*y + z*z ) * 180 );
    return vel;
}
So you can mess with that if you want, because it's better than what you have, floatpower tends to be slower than just multiplying the values itself.
Reply


Messages In This Thread
Speedometer system - by Typhome - 14.01.2012, 11:49
Re: Speedometer system - by Typhome - 14.01.2012, 15:18
Re: Speedometer system - by Mean - 14.01.2012, 15:24
Re: Speedometer system - by Typhome - 14.01.2012, 16:19
Re: Speedometer system - by Virtual1ty - 14.01.2012, 16:25
Re: Speedometer system - by iGetty - 14.01.2012, 16:27

Forum Jump:


Users browsing this thread: 1 Guest(s)