Trew HUD UI

User Interface created originally for ESX and then adapted for VRP/VRPEX.

Demo

Installation

  1. Extract the .zip or Open the .zip.
  2. Place trew_hud_ui in your resources directory.
  3. Add start trew_hud_ui to your server.cfg

Special Instructions for the ESX version

Requirements

Optional

What you can disable

Post Installation

			
	TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F', function(status)
		return true
	end, function(status)
		status.remove(1000)
	end)
	
	TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1', function(status)
		return true
	end, function(status)
		status.remove(750)
	end)
			
		

for this one

			
	TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F', function(status)
		return false
	end, function(status)
		status.remove(1000)
	end)
	
	TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1', function(status)
		return false
	end, function(status)
		status.remove(750)
	end)
			
		

Special Instructions for the VRP/VRPEX versions

Inside config.lua you will see a Config.vRP with certain items needed to set up properly, like black money. Since black money is considered an item on VRP/VRPEX versions, you need to put the ID of said item on this configuration. On most VRP versions, the ID is dirty_money.

Config.vRP
Special settings for vRP/vRPEX

Config.lua settings

Config.Locale
The language. Default is en.

Config.serverLogo
Logo for your server. It’s suggested that you upload a PNG file to websites like imgur.com and then paste the link there.

Config.font
Font configuration for the UI. Default is Montserrat and the link points up to Google Fonts. It’s suggested that you look up for a font there and place the name and the link on it’s location.

Config.date
Date format for the GPS location.

Config.voice
Voice settings for the UI. OneSync compatible

Config.vehicle
Vehicle and speedometer settings

Config.ui
Display or hide elements of the HUD

Adding Custom Status

Check by the thirst indicator

You can create custom indicators for status you already have, like stress status, drunken, shit, piss, you name it! You would just have to use the new exports functions. I would recommend you create a new script with the code and load it below trew_hud_ui on your server.cfg.


exports.trew_hud_ui.createStatus
Creates a new indicator after the existing ones.

Example:

			
	local STRESS_ACTIVE = false

	AddEventHandler('playerSpawned', function()
		
		if STRESS_ACTIVE == false then
			exports.trew_hud_ui:createStatus({
			    status = 'stress',
			    color = '#FF0090',
			    icon = '<i class="fas fa-brain"></i>'
			});
			STRESS_ACTIVE = true
		end

	end)
			
		

Usage:


exports.trew_hud_ui.setStatus
It is what makes the status update. It should be set on a Wait() timer to update on whenever your custom status is. The example below ticks while getting from a custom status registered on esx_status.

Example:

			
	Citizen.CreateThread(function()
		while true do
			Citizen.Wait(1000)
			
			local STRESS_STATUS
	
			TriggerEvent('esx_status:getStatus', 'stress', function(status)
			    STRESS_STATUS = status.getPercent()
			end)
	
			exports.trew_hud_ui:setStatus({
			    name = 'stress',
			    value = STRESS_STATUS
			});
		end
	end)
			
		

Usage:

Chat commands

/toggleui
Enables/Disables HUD information elements, like and job all types money. Useful for streamers.

Usage example: /toggleui

Donate

This HUD is the product of 4 months of work, craft and creativity. While now I'm giving it for free, if you want to help, consider donating any ammount you want to. It will be really appreciated. :)