JC Scripts
StoreDiscordYouTube
  • πŸ‘‹Welcome
  • β›” Fivem escrow system
    • ❔Error parsing script ... <\1>
    • ❓Failed to verify protected resource
  • Assets
    • πŸ’…Nails
      • Dependencies
      • Installation guide
        • QBCore
        • ESX
      • Config
      • FAQ
    • 🀑Peds
      • Dependencies
      • Installation guide
        • QBCore / ESX
      • Commands
      • Config
      • FAQ
    • πŸ’°Taxes
      • Dependencies
      • Installation guide
        • QBCore / ESX
      • Commands
      • Config
      • FAQ
    • Notify
      • Installation guide
        • QBCore
        • ESX
      • Config
      • FAQ
    • πŸ—ΊοΈPostal (Free)
      • Dependencies
      • Installation guide
        • Standalone
      • Commands
      • Config
      • FAQ
Powered by GitBook
On this page
  1. Assets
  2. Notify
  3. Installation guide

QBCore

1

Go to qb-core/client/functions.lua

Find QBCore.Functions.Notify

function QBCore.Functions.Notify(text, texttype, length)
    if type(text) == "table" then
        local ttext = text.text or 'Placeholder'
        local caption = text.caption or 'Placeholder'
        texttype = texttype or 'primary'
        length = length or 5000
        SendNUIMessage({
            action = 'notify',
            type = texttype,
            length = length,
            text = ttext,
            caption = caption
        })
    else
        texttype = texttype or 'primary'
        length = length or 5000
        SendNUIMessage({
            action = 'notify',
            type = texttype,
            length = length,
            text = text
        })
    end
end

Replace QBCore.Functions.Notify

function QBCore.Functions.Notify(text, texttype, length)
    if type(text) == "table" then
        local ttext = text.text or 'Placeholder'
        local caption = text.caption or 'Placeholder'
        texttype = texttype or 'primary'
        length = length or 5000
        TriggerEvent('jc-notify:client:notify', ttext, texttype, length)
    else
        texttype = texttype or 'primary'
        length = length or 5000
        TriggerEvent('jc-notify:client:notify', text, texttype, length)
    end
end
PreviousInstallation guideNextESX

Last updated 3 months ago