[ESX/QB] Simple Car Hud & Belt System


  • Hud includes: seatbelt, speedometer, turn signals, lights, fuel, gearbox.
  • Seatbelt System.
  • Blackout system when you exceed a certain speed.
  • Increases stress if the player is driving without a belt.
  • Enable/disable hud by command.
Config.lua

Config = {}


--░██████╗░███████╗███╗░░██╗███████╗██████╗░░█████╗░██╗░░░░░
--██╔════╝░██╔════╝████╗░██║██╔════╝██╔══██╗██╔══██╗██║░░░░░
--██║░░██╗░█████╗░░██╔██╗██║█████╗░░██████╔╝███████║██║░░░░░
--██║░░╚██╗██╔══╝░░██║╚████║██╔══╝░░██╔══██╗██╔══██║██║░░░░░
--╚██████╔╝███████╗██║░╚███║███████╗██║░░██║██║░░██║███████╗
--░╚═════╝░╚══════╝╚═╝░░╚══╝╚══════╝╚═╝░░╚═╝╚═╝░░╚═╝╚══════╝


Config.vehicle = {
	speedUnit = 'KMH', -- KMH or MPH
	maxSpeed = 350, 

	seatbelt = {
		playBuckleSound 	= true,
		playUnbuckleSound 	= true,
		playUnsafeSound 	= true
	},

	keys = {
		seatbelt 	= 29,
		cruiser		= 137,
		signalLeft	= 174,
		signalRight	= 175,
		signalBoth	= 173,
	}
}

-- Blackout is applied when it exceeds the maxSpeed ​​set above
Config.BlackoutTime = 2000 -- 2000 = 2 seconds


--███╗░░██╗░█████╗░████████╗██╗███████╗██╗░█████╗░░█████╗░████████╗██╗░█████╗░███╗░░██╗
--████╗░██║██╔══██╗╚══██╔══╝██║██╔════╝██║██╔══██╗██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║
--██╔██╗██║██║░░██║░░░██║░░░██║█████╗░░██║██║░░╚═╝███████║░░░██║░░░██║██║░░██║██╔██╗██║
--██║╚████║██║░░██║░░░██║░░░██║██╔══╝░░██║██║░░██╗██╔══██║░░░██║░░░██║██║░░██║██║╚████║
--██║░╚███║╚█████╔╝░░░██║░░░██║██║░░░░░██║╚█████╔╝██║░░██║░░░██║░░░██║╚█████╔╝██║░╚███║
--╚═╝░░╚══╝░╚════╝░░░░╚═╝░░░╚═╝╚═╝░░░░░╚═╝░╚════╝░╚═╝░░╚═╝░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝
---------------------------------------------------------------------------]]--

Config.Notification = function(title, message, time, types, svside, id)
    if svside then 
		TriggerClientEvent("esx:showNotification", source, message) -- ESX.
		--TriggerClientEvent('QBCore:Notify', source, message, type, length) --  QBCore.
    else -- Current script only use notifications by client-side
		TriggerEvent("esx:showNotification", message) -- ESX.
		--TriggerEvent('QBCore:Notify', message, type, length) -- QBCore.
    end
end

Config.Locales = {
	['warn_seatbelt'] = { title= "Seat Belt", text = "Buckle up! (B key)", type = "info" },
}

Download Resource

:link: Direct Download
:link: Download

Others Resources
[VRP/ESX/QB] Zombies V2
[VRP/ESX/QB] Report System
[ESX/QB] Money Wash
[ESX/QB] Craft
[ESX/QB] Tuning System
[ESX/QB] Zombies V1
[ESX/QB] Airdrop
[ESX/QB] ATM Robbery
[ESX/QB] Pause (ESC) Menu
[ESX/QB] Car HUD
[ESX/QB] Safezone
[ESX] Scoreboard
[ESX] Identity

Code is accessible No
Subscription-based No
Lines (approximately) 670
Requirements interact-sound (optional)
Support Yes
2 Likes

Possible to change color?

Sure.

Link expired
can we get new ?

1 Like

new link updated :wink:

very good

1 Like

Works great, but having one issue. I change it to MPH in config, but its still doing the math for KMH. I know most scripts use 3.6 or 2.23694 for kmh or mph.
Any way we could implement this? I tried myself but its encrypted.

Edit: Also just noticed cruise control isnt working for me.

1 Like

Hey, thanks for the feedback.

I just reviewed and updated the script, download it again.

1 Like

Youtube Video Link updated.

Added the direct download to the post. Enjoy it.

how would i change the color?

It is possible via .css file.
If you need help, let me know :wink:

Updated script.

  • Optimized.
  • Config.lua reworked.

Is it possible to change the possition of the hud?

Yes it’s possible by .css file.

How do I use the seatbelt sound?

By default it is prepared for “interact-sound” (script that reproduces sounds) but you can change it to another one in the client.lua, it’s just 1 line of code

I am now having issues with the seatbelt not working. Cruise control still doesnt either, but I added a different resource to cover that.
I tried updating it today as well. Any ideas?

it doesnt work

The sound?