GuxFiz
DiscordTEBEX
  • Welcome To GX Documentation
  • Resources🐧
    • gx_peds
      • Installation
      • Configuration
    • gx_announcejobv2
      • Installation
      • Configuration
      • Exports
    • gx_announcejob
      • Installation
      • Configuration
      • How Use?
    • gx_medo
      • Installation
      • Configuration
      • Exports
    • gx_createnpc
      • Installation
      • Configuration
    • gx_notify
      • Installation
      • Configuration
      • Exports
      • Integrations
Powered by GitBook
On this page
  1. Resources🐧
  2. gx_notify

Integrations

Integrations of gx_notify Resource

ESX v1.12.4

-- path => es_extended/client/functions.lua
function ESX.ShowNotification(message, notifyType, length)
    return IsResourceFound('esx_notify') and exports['esx_notify']:Notify(notifyType, length, message)
end

-- with Gx_notify
function ESX.ShowNotification(message, notifyType, length)
    return exports.gx_notify:Notify(message)
end
-- path => es_extended/client/functions.lua
function ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
    AddTextEntry("esxAdvancedNotification", msg)
    BeginTextCommandThefeedPost("esxAdvancedNotification")
    if hudColorIndex then
        ThefeedSetNextPostBackgroundColor(hudColorIndex)
    end
    EndTextCommandThefeedPostMessagetext(textureDict, textureDict, false, iconType, sender, subject)
    EndTextCommandThefeedPostTicker(flash, saveToBrief == nil or saveToBrief)
end

-- with Gx_notify
function ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
    exports.gx_notify:NotifyAdvanced({
        title = sender,
        subject = subject,
        message = msg,
        icon = textureDict,
        timeout = 10,
    })
end
-- path => es_extended/client/functions.lua
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

-- with Gx_notify
function ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
    exports.gx_notify:Notify(msg)
end

PreviousExports

Last updated 1 month ago