Snippets
Hieronder kan je vinden hoe je de framework default notify aan kan passen.
ESX (es_extended)
Open es_extended/client/functions.lua
en zoek naar:
function ESX.ShowNotification
Verander de gehele function met:
function ESX.ShowNotification(message, notifyType, length, title)
notifyType = notifyType or 'info'
length = length or 5000
title = title or 'title'
exports['cobra-notify']:Notify(notifyType, title, message, length)
end
QBCORE (qb-core)
Open qb-core/client/functions.lua
en zoek naar:
function QBCore.Functions.Notify
Verander de gehele function met:
function QBCore.Functions.Notify(text, texttype, length, icon)
local notifyType = texttype or 'primary'
if notifyType == 'primary' then notifyType = 'info' end
local notifyLength = length or 5000
if type(text) == 'table' then
notifyTitle = text.caption or 'title'
notifyMessage = text.text or 'No message found'
else
notifyTitle = 'title'
notifyMessage = text or 'No message found'
end
exports['cobra-notify']:Notify(notifyType, notifyTitle, notifyMessage, notifyLength)
end
Last updated