infoConfiguration

This script doesn't have a config.lua file however you will need to follow the below steps to replace the normal notifications on your framework.


Using qb-core

circle-info

In order to replace your qb-core notifications you will need to add the following snippet into your core files as shown below. qb-core -> client -> functions.lua

function QBCore.Functions.Notify(text, texttype, length, icon)
local notificationType = 'info'

if texttype then
    local lowerType = string.lower(texttype)
    if lowerType == 'success' or lowerType == 'primary' then
        notificationType = 'success'
    elseif lowerType == 'error' or lowerType == 'danger' then
        notificationType = 'error'
    elseif lowerType == 'warning' or lowerType == 'alert' then
        notificationType = 'warning'
    elseif lowerType == 'money' then
        notificationType = 'money'
    else
        notificationType = 'info'
    end
end

local title = 'Notification'
local message = ''

if type(text) == 'table' then
    message = text.text or 'Placeholder'
    title = text.caption or 'Notification'
else
    message = text
end

-- Use the export
exports['SG_Notifications']:ShowNotification(notificationType, title, message, length or 5000)
end


Using q-box

circle-info

In order to replace your ox_lib notifications you will need to add the following snippet into your core files as shown below. ox_lib -> resource -> interface -> client -> notify.lua


Changing Notification Image

circle-info

Changing the Image that displays on the notification is easy as long as you have access to applications such as paint.net. You will find the files in the notification_images folder as PNG files.

triangle-exclamation

Last updated