[RELEASE] Forza Horizon 4 Speedometer

Good day @Akkariin,

I have noticed that the script still runs when the player is not in a vehicle.

Code to resolve the issue.
	while true do
		playerPed = GetPlayerPed(-1)
		if IsPedInAnyVehicle(playerPed) then
			if playerPed and not isHide then
				playerCar = GetVehiclePedIsIn(playerPed, false)
				if playerCar and GetPedInVehicleSeat(playerCar, -1) == playerPed then
					carRPM                    = GetVehicleCurrentRpm(playerCar)
					carSpeed                  = GetEntitySpeed(playerCar)
					carGear                   = GetVehicleCurrentGear(playerCar)
					carIL                     = GetVehicleIndicatorLights(playerCar)
					carHandbrake              = GetVehicleHandbrake(playerCar)
					carBrakePressure          = GetVehicleWheelBrakePressure(playerCar, 0)
					carLS_r, carLS_o, carLS_h = GetVehicleLightsState(playerCar)
						ShowHud             = true,
						CurrentCarRPM       = carRPM,
						CurrentCarGear      = carGear,
						CurrentCarSpeed     = carSpeed,
						CurrentCarKmh       = math.ceil(carSpeed * 3.6),
						CurrentCarMph       = math.ceil(carSpeed * 2.236936),
						CurrentCarIL        = carIL,
						CurrentCarHandbrake = carHandbrake,
						CurrentCarBrake     = carBrakePressure,
						CurrentCarLS_r      = carLS_r,
						CurrentCarLS_o      = carLS_o,
						CurrentCarLS_h      = carLS_h,
						PlayerID            = GetPlayerServerId(GetPlayerIndex())
					SendNUIMessage({HideHud = true})

After adding a simple if statement to determine if the player is in a vehicle the scripts runtime decreases.

I already made a pull request on the you’re Github.

Have a nice day!

Thanks, I uploaded the new code, now it only take 0.01ms and 0.26% CPU time.


I have noticed a small error i had made. After the UI is displayed on the screen it does not remove the UI once a player is out of a vehicle. I resolved this by placing else and sending a NUI message to hide the HUD.

I went ahead and pushed another request through Github.

Thank you,


Thanks, I updated the code manually because there have some conflicts that need to be resolved

1 Like

I realized a mistake i made once uploaded it, i saw you did the same to fix the issue by simply adding a wait.

Anyways love the work you have done!

Hi guys, I am running this on local fiveM server and it is shuttering for me for some reason, I do not know why, other speedometers that I have tried worked fine.


  • Fuel
  • Engine
  • Hide Speedometer when open phone

thank you :relaxed: Pls.

Hello, here is a small modification that I made to the script. (All rights to the owners, I just modified several things and wanted to share it with you in case someone likes it @Akkariin )

  • Size minimized by 50%

  • Added SPORT + option (changes color according to the car’s gear, green, orange and red)

  • Remove HBK and add a stop emoji (lights up when you brake with the space bar)

I leave several images:

-Car stopped in R (GREEN):


-Car in normal speed (ORANGE):


-Car with high gear (RED):


-Car braking with space bar:


-Here is the download link from MEGA:


Thank you and I hope you like it. Leave your criticisms and answers, I will answer you and read delighted! Greetings, Rauw!

1 Like