29.12.2015, 12:23
How do I make if the vehicle speed raise it will change the color of the speedo?
Like green until 50 then yellow until 80 then red?
Like green until 50 then yellow until 80 then red?
#define MPH_KMH 1.609344
stock GetVehicleSpeed( vehicleid )
{
new
Float:x,
Float:y,
Float:z,
vel;
GetVehicleVelocity( vehicleid, x, y, z );
vel = floatround( floatsqroot( x*x + y*y + z*z ) * 180 ); // KM/H
// vel = floatround( floatsqroot( x*x + y*y + z*z ) * 180 / MPH_KMH ); // Mph
return vel;
}