π§Installation
Follow the steps on this page in detail to get the HUD working correctly on your server, let's go through the steps!
First of all we want you to know that our script only supports the versions of the three most used frameworks, in previous versions it can be usable but we do not provide support since the development is focused on the updated versions of the ESX, QBOX and QBCore frameworks.
1. Resource Installation
The installation of the script is very simple. First of all, you will make sure you have the dependencies installed on your server.
β οΈDependenciesSecondly, you are going to download the CFX Portal file and then unzip it. Next, you are going to drag the file to your server. When you have completed the process, you are going to go to the server.cfg file and make the following changes:
ensure oxmysql
ensure es_extended
ensure ox_lib
ensure pma-voice
ensure jgs-hudensure oxmysql
ensure qb-core
ensure ox_lib
ensure pma-voice
ensure jgs-hudThen, you must go to the Settings section to customize the hud to your liking. After that, you should remove the old hud scripts such as esx_notify, esx_hud, speedometer or qb-hud.
function ESX.ShowHelpNotification(text, customKey)
local key, textAfter = text:match('[~rgbycfnztopqsmld]*%[?([%a%d])%]?~?[~rgbycfnztopqsmld]*%s*(.*)$')
return exports['jgs-hud']:ShowHelp(customKey or key, textAfter ~= '' and textAfter or text)
end
function ESX.ShowNotification(...)
return exports['jgs-hud']:AddNotify(...)
end
local helpNotifications = {}
function ESX.HideUI()
for text, key in pairs(helpNotifications) do
exports['jgs-hud']:RemoveHelp(key)
helpNotifications[text] = nil
end
end
function ESX.TextUI(message)
if helpNotifications[text] then return end
local key, textAfter = text:match('[~rgbycfnztopqsmld]*%[?([%a%d])%]?~?[~rgbycfnztopqsmld]*%s*(.*)$')
helpNotifications[text] = exports['jgs-hud']:CreateHelp(key or '', textAfter ~= '' and textAfter or text)
return helpNotifications[text]
end
function ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
local __type = textureDict and textureDict == 'CHAR_BANK_MAZE' and 'bank' or 'info'
TriggerEvent('jgs:notification', msg, __type, sender, iconType, saveToBrief, flash, hudColorIndex)
end2. Progress System Installation
1. Factory Function
This is the original QBCore.Functions.Progressbar function provided by default:
2. Updated Function
Replace the above function with the following code. This updated function supports both progressbar and jgs-hud resources:
3. Explanation
Dual Compatibility: The updated function first checks if
jgs-hudis started and uses it if available. If not, it defaults toprogressbar.Validation: The
validateResourcehelper function ensures the required resources (jgs-hudorprogressbar) are running before executing their respective logic.Callbacks: The
executeCallbackfunction simplifies the handling ofonFinishandonCancellogic.Customization: The
DEFAULT_PROGRESS_TYPEvariable allows you to switch between progress types (e.g.,barorcircle) when usingjgs-hud.
4. Steps to Replace
Open the file where the original
QBCore.Functions.Progressbaris defined.Replace the original function with the updated function provided above.
Ensure both
progressbarandjgs-hudare properly installed and configured in your server resources.
By making this change, your server will seamlessly support progress bars from both jgs-hud and progressbar resources!
1. Factory Function (ESX)
This is the original ESX.Progressbar function provided by default:
2. Updated Function (ESX)
Replace the above function with the following code. This updated function supports both jgs-hud and esx_progressbar resources:
3. Explanation
Dual Compatibility: The updated functions first check if
jgs-hudis started and use it if available. If not, they default toprogressbaroresx_progressbar.Validation: The
validateResourcehelper function ensures the required resources are running before executing their respective logic.Customization: The
DEFAULT_PROGRESS_TYPEvariable allows you to switch between progress types (e.g.,barorcircle) when usingjgs-hud.
4. Steps to Replace
Open the file where the original
QBCore.Functions.ProgressbarorESX.Progressbaris defined.Replace the original function with the updated function provided above.
Ensure all relevant resources (
jgs-hud,progressbar, oresx_progressbar) are properly installed and configured in your server resources.
By making these changes, your server will seamlessly support progress bars from jgs-hud, progressbar, and esx_progressbar resources!
Last updated
Was this helpful?