[RELEASE] TREW HUD UI - A lightweight HUD for ESX, VRP AND VRPEX

Hey found a fix, make a new script resource in your resources folder called “hud_fix” or something you want.

Make two files and pop the below code in (note for client.lua you might want to add/remove the various options, I saved the link to the numbers so you can re-create the lines as needed.

client.lua

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		HideHudComponentThisFrame(1) -- Wanted Stars
		HideHudComponentThisFrame(2) -- Weapon Icon
		HideHudComponentThisFrame(3) -- Cash
		HideHudComponentThisFrame(4) -- MP Cash
		HideHudComponentThisFrame(5) -- MP Message
		HideHudComponentThisFrame(6) -- Vehicle Name
		HideHudComponentThisFrame(7) -- Area Name
		HideHudComponentThisFrame(8) -- Vehicle Class
		HideHudComponentThisFrame(9) -- Street Name
	end
end)

-- https://docs.fivem.net/natives/?_0x6806C51AD12B83B8

__resource.lua

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

client_script 'client.lua'

Then simply add the resource name to your server.cfg (ensure hud_fix or whatever you called it)

1 Like

HUD NOT MOVING FIX:

So I spent ages changing this bit of code trying to work out why it won’t move:

.info.server = the server image
.info.player = the player hud e.g. health, stam, water, food, money, job name etc

After having a good look in the javascript I can see it checks for true/false flags for the element. I enabled the server image flag in config.lua to true and used a transparent one (https://i.imgur.com/kJbENNM.png) and then changed:

.info.player { top: 140px; right: 25px; text-align: right;}

TO:

.info.player { bottom: 22px; right: 25px; text-align: right;}

NOTE: I have my street area, voice icon and speedo in other areas so the bottom right is free to have it down there.

So I assume theres some quirk with not having a server image and then the hud being able to be moved, I don’t know enough coding to understand why that is, I assume the element part is messing with the CSS if it’s being told to add the pixel margin when flagged as false?

How can i enable the mini map

in config.lua

Hi guys. i keep getting this error, anyone know how to fix it.
attempt to perform arithmetic on a nil value (seatbeltejectspeed)

Weird, sounds like an error on seat belt ejcetion on crash, I assume it occurs when you have no seatbelt on as you hit something?

Sounds like you may have broken something on the script, might pay to zip up the addon and add a fresh install of it and then try again.

Thanks m8