Speedo - big intervals
#1

HEy guys,
can you help me about big intervals/differences on my speedo

http://prntscr.com/hpowa6

Its doing like: 0 - 15, then 40 (full throttle)

How to make it going: 0,1,2,3,4.....38,39,40....

Код:
				format(lstring,sizeof(lstring),"~b~Vozilo ~w~%s~n~~b~Zdravlje: ~w~%.2f~n~~b~GPS: ~w~%s~n~~g~KM/H: ~w~%d",VehicleNames[GetVehicleModel(GetPlayerVehicleID(i)) - 400],L_VehHealth,LuxZone,GetPlayerSpeed(i,true));
				TextDrawSetString(LFunc[i], lstring);
				if(L_VehHealth <= 500){
					format(lstring,sizeof(lstring),"~b~Vozilo: ~w~%s~n~~b~Zdravlje: ~w~%.2f~n~~b~GPS: ~w~%s~n~~g~KM/H: ~w~%d",VehicleNames[GetVehicleModel(GetPlayerVehicleID(i)) - 400],L_VehHealth,LuxZone,GetPlayerSpeed(i,true));
					TextDrawSetString(LFunc[i], lstring);
				}
				if(GetPlayerSpeed(i,true) >= VehicleMaxSpeed)
				{
					format(lstr,sizeof(lstr),"~n~~g~KM/H: ~r~%d",GetPlayerSpeed(i,true));
     				TextDrawSetString(Lmph[i], lstr);
				}
Код:
GetPlayerSpeed(playerid,bool:kmh) // by misco
{
    new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
    if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
    rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
    return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
Reply


Messages In This Thread
Speedo - big intervals - by tbedy - 19.12.2017, 17:04
Re: Speedo - big intervals - by EmpireSk - 19.12.2017, 17:26
Re: Speedo - big intervals - by Kraeror - 19.12.2017, 17:27
Re: Speedo - big intervals - by tbedy - 20.12.2017, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)