HUD setup into ESX > 1.13.0
This is a short and simple guide that explains how to set up our notifications in your es_extended
Notifys
Search in the es_extended/client/functions.lua for this function:
function ESX.ShowNotification(message, notifyType, length, title)
return IsResourceFound('esx_notify') and exports['esx_notify']:Notify(notifyType, length, message)
end
Replace the old one with this
function ESX.ShowNotification(message, notifyType, length, titleNotify)
if notifyType == nil then
notifyType = "info"
end
if titleNotify == nil then
titleNotify = "Notify"
end
exports["S-HUD"]:MakeNotifyInfo(notifyType, titleNotify , message, length)
end
Help Notify
Search in the es_extended/client/functions.lua for this function:
function ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
AddTextEntry("esxHelpNotification", msg)
if thisFrame then
DisplayHelpTextThisFrame("esxHelpNotification", false)
else
BeginTextCommandDisplayHelp("esxHelpNotification")
EndTextCommandDisplayHelp(0, false, beep == nil or beep, duration or -1)
end
end
Replace the old one with this
function ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
exports["S-HUD"]:MakeHelpNotify("E", msg)
end
Progress Bar
Search in the es_extended/client/functions.lua for this function:
function ESX.Progressbar(message, length, options)
return IsResourceFound('esx_progressbar') and exports['esx_progressbar']:Progressbar(message, length, options)
end
Replace the old one with this
function ESX.Progressbar(message, length, options)
exports["S-HUD"]:MakeProgressbar(message, length)
end
Text UI
Search in the esx_textui/TextUI.lua for this function:
local function TextUI(message, typ)
isShowing = true
SendNUIMessage({
action = "show",
message = message and message or "ESX-TextUI",
type = type(typ) == "string" and typ or "info",
})
end
Replace the old one with this
local function TextUI(message, typ)
isShowing = true
exports["S-HUD"]:ShowTextUI("E", message)
end
Hide Text UI
Search in the esx_textui/TextUI.lua for this function:
local function HideUI()
if not isShowing then
return
end
isShowing = false
SendNUIMessage({
action = "hide",
})
end
Replace the old one with this
local function HideUI()
if not isShowing then
return
end
isShowing = false
exports["S-HUD"]:HideTextUI()
end
Last updated