Hydex-Developments
  • About us
  • SCRIPTS
    • Hydex-Notify
      • Conifg
      • EXPORTS AND EVENTS
      • Framework Integrations
  • Hydex-Adminmenu
    • Config
    • Features
Powered by GitBook
On this page
  • ESX
  • QBCore
  1. SCRIPTS
  2. Hydex-Notify

Framework Integrations

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)
end

QBCore

File: 'qb-core/client/functions.lua' Function: QBCore.Functions.Notify Line: ~155

Replace the function with give 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)
end
PreviousEXPORTS AND EVENTSNextHydex-Adminmenu

Last updated 8 months ago