CORE INTEGRATION
To make things easier, we’ve included examples below that show you how to change a framework’s code so that it always uses hydex-notify.
ESX
- File:
es_extended/client/function.lua- Function:
ESX.ShowNotification- Line:
~60
Replace the function with given snippet
function ESX.ShowNotification(message, type, length)
if (GetResourceState("hydex-notify") == "missing") then
Citizen.Trace("^8ERROR ^7hydex-notify is not started")
return
end
local title = "Notify"
TriggerEvent('hydex-notify:shownotification', title, message, type, length)
endQBCore
- File:
qb-core/client/functions.lua- Function:
QBCore.Functions.Notify- Line:
~155
Replace the function with given snippet
function QBCore.Functions.Notify(text, texttype, length)
if (GetResourceState("hydex-notify") == "missing") then
Citizen.Trace("^8ERROR ^7hydex-notify is not started")
return
end
local t = "info"
if (texttype) then t = texttype end
TriggerEvent('hydex-notify:shownotification', t, text, texttype, length)
endLast updated on