Notify

function in config.lua

General

This function is used to integrate any external notify into the script. The notifys of the ox_lib are included by default.

Arguments

ArgumentData TypeOptionalDefault ValueExplanation

pTitle

string

Yes

-

the title of the notify

pMsg

string

No

-

the message content of the notify

pType

string

Yes

"inform" or "success" or "error"

the type of the nofify

Examples

ESX.ShowNotification:

function Notify(pTitle, pMsg, pType)
    if pType == "inform" then
        pType = "info"
    end
    
    ESX.ShowNotification(pMsg, false, true, nil)
end

okokNotify:

function Notify(pTitle, pMsg, pType)
    if pType == "inform" then
        pType = "info"
    end
    
    exports['okokNotify']:Alert(pTitle, pMsg, 5000, 'type', true)
end

Last updated