Installation

  1. oxmysql muss laufen.
  2. Nach Framework starten. Optional alte Notify/Progress-Ressourcen stoppen (esx_notify, esx_textui, esx_progressbar, progressbar).
  3. Framework-UI auf HCS_hud umleiten (siehe unten).
  4. config.lua anpassen (Framework, Permissions, Sync, Einreise).
cfg
ensure oxmysql
ensure es_extended   # oder qb-core / qbx_core
ensure HCS_hud

ESX (es_extended/client/functions.lua)

lua
function ESX.ShowNotification(message, notifyType, length, title)
    exports['HCS_hud']:Notify(title or 'Notification', message, notifyType or 'info', length or 5000)
end

function ESX.ShowAdvancedNotification(sender, subject, msg)
    exports['HCS_hud']:Notify(sender or subject or 'Notification', msg, 'info', 5000)
end

function ESX.ShowHelpNotification(msg, thisFrame)
    if thisFrame then
        exports['HCS_hud']:HelpNotify(msg)
    else
        exports['HCS_hud']:ShowHelpNotify(msg)
    end
end

function ESX.TextUI(text)
    exports['HCS_hud']:ShowHelpNotify(text)
end

function ESX.HideUI()
    exports['HCS_hud']:HideHelpNotify()
end

function ESX.Progressbar(message, length)
    exports['HCS_hud']:StartProgressbar(length or 5000, message)
end

function ESX.CancelProgressbar()
    exports['HCS_hud']:StopProgressbar()
end

QBCore (qb-core/client/functions.lua)

lua
function QBCore.Functions.Notify(text, textype, length)
    local title, message = 'Notification', ''
    local nType = textype or 'primary'
    if type(text) == 'table' then
        title = text.caption or title
        message = text.text or ''
    else
        message = text or ''
    end
    if nType == 'primary' then nType = 'info' end
    exports['HCS_hud']:Notify(title, message, nType, length or 5000)
end

function QBCore.Functions.Progressbar(name, label, duration, _, _, _, _, _, _, onFinish)
    exports['HCS_hud']:StartProgressbar(duration, label)
    if onFinish then
        SetTimeout(duration, onFinish)
    end
end

qb-core/client/drawtext.lua:

lua
local function drawText(text)
    exports['HCS_hud']:ShowHelpNotify(text)
end

local function hideText()
    exports['HCS_hud']:HideHelpNotify()
end