[FREE] [QB][ESX] 📺 east - HUD (player status & speedometer)

im new to all of this how to i add add exports[‘east_hud’]:seatbelt(true)

1 Like

Is the seat belt unusable?

do you fixit?

It seems that there were no proper explanation on how to fix icon toggle

so I started to look in and figured it out. Sorry for those who uses ESX, can’t help as I’m using QB. But probably there will be the same fix as on QB(the same logic)
So what have I done to make it work:

  1. I went through and checked the logic of the east_hud and seems that everything in here should not be touched at all. If you want to toggle the icon of this hud, you will need to go to
    qb resources of yours. find qb-smallresources, open seatbelt.lua and fine line 38
    it will be this line:
local function ToggleSeatbelt()
    seatbeltOn = not seatbeltOn
    TriggerEvent("seatbelt:client:ToggleSeatbelt")
    TriggerServerEvent("InteractSound_SV:PlayOnSource", seatbeltOn and "carbuckle" or "carunbuckle", 0.25)
end

To toggle the icon, you will need to paste here toggle export code line, that was provided by developer. so the code should look like that:

local function ToggleSeatbelt()
    seatbeltOn = not seatbeltOn
    TriggerEvent("seatbelt:client:ToggleSeatbelt")
    exports['east_hud']:seatbelt(seatbeltOn) -- in here you need to change the state from true/false to seatbelton to make it work.
    TriggerServerEvent("InteractSound_SV:PlayOnSource", seatbeltOn and "carbuckle" or "carunbuckle", 0.25)
end

QBCore Path:

%YOUR_PATH%\resources[qb]\qb-smallresources\client\seatbelt.lua

Lines to be updated 38-42

Hope this helps! For ESX should be similar fix.

3 Likes

If anyone will find do a fix for ESX. Reply to this comment!

Check my latest comment if you haven’t fixed yet. Provided how to make it work

1 Like

Nice work could you add a speedometer disable ? I’d like to add a random real

where do i put “true”

which export should I set to ensure that the seat belt works is this --seatbelt toggle export:
exports[‘east_hud’]:seatbelt(true) or this --seatbelt toggle export:
exports[‘east_hud’]:seatbelt(false)

local function toggleSeatbelt()
    seatbeltOn = not seatbeltOn
    SeatBeltLoop()
    TriggerEvent("seatbelt:client:ToggleSeatbelt")
    exports['east_hud']:seatbelt(seatbeltOn) -- Call the seatbelt function exported by east_hud, passing in the current seatbelt state seatbeltOn
    TriggerServerEvent("InteractSound_SV:PlayWithinDistance", 5.0, seatbeltOn and "carbuckle" or "carunbuckle", 0.25)
end

I’ve noticed that there may be a slight problem
Above is my modified code, below is the problem found, I am using the qb-core server that I downloaded when txadmin was deployed, I hope this will help!
Case difference in function names: the first snippet uses toggleSeatbelt while the second snippet uses ToggleSeatbelt. function names are case sensitive in Lua.

SeatBeltLoop() call: in the first snippet, there is a SeatBeltLoop() function call, while in the second snippet there is no such call.

Parameters of TriggerServerEvent: in the first snippet, the first parameter of the TriggerServerEvent call is “InteractSound_SV: PlayWithinDistance”, while in the second snippet it is “InteractSound_SV: PlayOnSource”. This means they will trigger different server events.

Parameters of TriggerServerEvent: In the first snippet, the second parameter of the TriggerServerEvent call includes a distance parameter (5.0), whereas in the second snippet it only has a sound name parameter and a volume parameter.

Where do i do the export for esx homie ?

You know where i need to add the export =?

Hello, i cant fix seatbelt, everyone says that they edit seatbelt.lua script, but i dont have seatbelt.lua script and i cant export it, can someone send me seatbelt.lua file please?

Hello, when i press the seatbelt button, the seatbelt icon stays on red color, any fix how to change that when the seatbelt is on then the icon is green?

Use the exports

exports[‘east_hud’]:seatbelt(true/false)

Is there any way to prevent the hud from appearing at the beginning of character selection?


i need help removing the green health and blue bar

Try this

Is it possible for you to add something related to the microphone and tone of voice? street name? make the belt icon work? stress option?

Is your hud version complete? street names, functional belts and stress?