29.12.2015, 14:07
set a timer to call to check for the vehicle's speed and then set it to the desired colour if the required speed is match
PHP код:
#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;
}