Skip to Content

Bridges

Bridges make the scripts already on your server show the gui_interface notification and progress, without changing every call.

BridgeAnswers for
Config.pontes.vrpevents Notify, itensNotify, progress and the vrp_taskbar taskbar
Config.pontes.esxesx_notify and esx_progressbar
Config.pontes.qbcorethe progressbar resource
Config.pontes.mythicmythic_notify
Config.pontes.okokokokNotify

vRP

Nothing to do. With Config.pontes.vrp = true (default) these already work:

server.lua
TriggerClientEvent("Notify", source, "sucesso", "Text", 5000) TriggerClientEvent("itensNotify", source, "Recebeu", "water", 2) TriggerClientEvent("progress", source, 10000, "Text")

So does the old vrp_taskbar (vTASKBAR.taskThree(source) and the others).

ESX

Notification and progress

Pick one option.

Option A, without touching ESX:

  1. In server.cfg, remove ensure esx_notify and ensure esx_progressbar. Leave the folders where they are.
  2. In gui_interface’s fxmanifest.lua, remove the -- from these lines:
    gui_interface/fxmanifest.lua
    provide "esx_notify" provide "esx_progressbar"
  3. In config.lua: Config.pontes.esx = true.
  4. Put ensure gui_interface before ensure es_extended.

If F8 shows Resource esx_notify is Missing, use option B.

Option B, one line in ESX. File es_extended/client/modules/ui/notifications.lua (older ESX: es_extended/client/functions.lua). Keep Config.pontes.esx = false.

First line inside function ESX.ShowNotification(...):

es_extended/client/modules/ui/notifications.lua
if GetResourceState("gui_interface") == "started" then return exports.gui_interface:EsxNotify(notifyType, length, message, title) end

First line inside function ESX.Progressbar(...):

if GetResourceState("gui_interface") == "started" then return exports.gui_interface:EsxProgress(message, length, options) end

First line inside function ESX.CancelProgressbar():

if GetResourceState("gui_interface") == "started" then return exports.gui_interface:PararProgresso() end

This covers ESX.ShowNotification, xPlayer.showNotification, esx:showNotification and ESX.Progressbar.

Items

Automatic with the default ESX inventory and with ox_inventory (Config.itens.automatico = true).

QBCore

Notification

File qb-core/client/functions.lua, first line inside function QBCore.Functions.Notify(text, texttype, length, icon):

qb-core/client/functions.lua
if GetResourceState("gui_interface") == "started" then return exports.gui_interface:QBNotify(text, texttype, length) end

Covers QBCore.Functions.Notify and TriggerClientEvent("QBCore:Notify", ...).

Progress

Pick one option.

Option A, one line in the progressbar resource. File progressbar/client.lua, first line inside local function StartProgress(action, onStart, onTick, onFinish):

progressbar/client.lua
if GetResourceState("gui_interface") == "started" then return exports.gui_interface:QBProgress(action, onFinish, onStart, onTick) end

Covers QBCore.Functions.Progressbar, every progressbar export and the progressbar:client:cancel event.

Option B, without editing:

  1. In server.cfg, remove ensure progressbar.
  2. In gui_interface’s fxmanifest.lua, remove the -- from provide "progressbar".
  3. Config.pontes.qbcore = true.

If you see progressbar needs to be started, use option A.

Items

Automatic with qb-inventory, ps-inventory, lj-inventory and ox_inventory.

qb-inventory keeps showing its own box when a script fires qb-inventory:client:ItemBox. To show only ours, empty that event’s body in qb-inventory/client/main.lua.

QBox and ox_lib

QBox uses ox_lib for notifications and progress. Only edit ox_lib.

File ox_lib/resource/interface/client/notify.lua, first line inside function lib.notify(data):

ox_lib/resource/interface/client/notify.lua
if GetResourceState("gui_interface") == "started" then return exports.gui_interface:OxNotify(data) end

File ox_lib/resource/interface/client/progress.lua, first line inside function lib.progressBar(data) and function lib.progressCircle(data):

ox_lib/resource/interface/client/progress.lua
if GetResourceState("gui_interface") == "started" then return exports.gui_interface:OxProgress(data) end

Same file, first line of function lib.progressActive():

if GetResourceState("gui_interface") == "started" and exports.gui_interface:ProgressoAtivo() then return true end

And first line of function lib.cancelProgress():

if GetResourceState("gui_interface") == "started" and exports.gui_interface:ProgressoAtivo() then return exports.gui_interface:PararProgresso() end

Covers lib.notify, exports.qbx_core:Notify, TriggerClientEvent("ox_lib:notify", ...), lib.progressBar and lib.progressCircle.

Items: automatic with ox_inventory.

mythic_notify and okokNotify

  1. In server.cfg, remove ensure mythic_notify (or ensure okokNotify).
  2. In fxmanifest.lua, remove the -- from provide "mythic_notify" (or provide "okokNotify").
  3. Config.pontes.mythic = true (or Config.pontes.okok = true).

Scripts calling exports["mythic_notify"]:DoHudText(...), mythic_notify:client:SendAlert, exports["okokNotify"]:Alert(...) or okokNotify:Alert now show our notification.

Another script with its own notification

Replace its call:

my_script/client.lua
-- before exports["my_notify"]:Show("Text", "success") -- after exports.gui_interface:Notificar("success", "Text")

Updating ESX, qb-core, progressbar or ox_lib removes the lines above. Add them again after each update.