Speedometer system
#1

Hello!
I have speedometer system (and i didnt created this) - I copyed from FS to GM and used it.
But this speedometer have bit unrealistic, like im driving with infernus and max km/h is showing that 120, but must be +200 km/h...
And i dont know how edit this km/h, so please help.
Reply
#2

Can anyone help about this?
Reply
#3

Mess around with this line:
pawn Код:
Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 100.0);
Reply
#4

Do i edit 100.0 to 200.0 or what? I dont know how make km/h realistic..
Reply
#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
#6

Try and change 100.0 to something like, 180.0.

If that doesn't work, then try 200.0.

Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)