View Single Post
Old 14/02/2020, 03:25 PM   #2
jasperschellekens
High-roller
 
jasperschellekens's Avatar
 
Join Date: Dec 2016
Location: Holland
Posts: 1,066
Reputation: 106
Default Re: Speedometer meter distance Help

I use a timer and something like this for mileage:
PHP Code:
    new vehicleid GetPlayerVehicleID(playerid), Float:speed_xFloat:speed_yFloat:speed_zFloat:final_speedvalue;
        
GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
        
final_speed floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*85.4166672;
        
value floatround(final_speed,floatround_round);

        if(
TD_L_Value[playerid] == value
            return 
1;

    new 
plusma=value/=8;
    
MileAgeIM[vehicleid]+=plusma;

    if(
MileAgeIM[vehicleid]>=1600// Every 1600 meters mileage goes up by 1
    
{
        
MileAgeI[vehicleid]+=1;
        
MileAgeIM[vehicleid]=0;
    } 
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!


Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Discord - Website
jasperschellekens is offline   Reply With Quote