file-arrow-downExports and Events

circle-check

Via export (Client-Side)

exports['PNotif']:sendNotification({
    title = 'Titre de la notification',
    message = 'Message de la notification',
    type = 'success',
    duration = 5000
})

Via Event (Serveur to Client)

TriggerClientEvent('pnotif:sendNotification', playerId, {
    title = 'Titre de la notification',
    message = 'Message de la notification',
    type = 'info',
    duration = 4000
})

Example

RegisterCommand('notifyServerTest', function(source, args, rawCommand)
    TriggerClientEvent('pnotif:sendNotification', source, {
        title = '~r~Titre~s~ ~g~Coloré~s~',
        message = 'Ceci est un test avec ~b~titre coloré~s~ depuis le serveur',
        type = 'success',
        duration = 5000
    })

    TriggerClientEvent('pnotif:sendNotification', source, {
        title = '~y~Attention~s~',
        message = 'Message ~o~important~s~ avec titre ~bold~en gras~s~',
        type = 'warning',
        duration = 5000
    })

    TriggerClientEvent('pnotif:sendNotification', source, {
        title = '~lg~Super~s~ ~bold~Succès~s~',
        message = 'Opération réussie avec ~g~titre en couleur~s~',
        type = 'info',
        duration = 5000
    })
end)

You can always use esx.ShowNotification. If you make any changes in your es_extended, go to the file es_extended/client/functions.lua.

Replace

Then, add this

Last updated