Change 1 function and your new Notifications are ready to use.
Custom Notification Features:
Set custom icon
Set custom sound
Set volume of sound
Option to mute sound
Create your custom notify in the config.lua !
You can use the regular QBCore Notify function or the regular ESX Notify function the v42-notify script will do everything for you. README Included to install the script correctly!
You could try to replace this function in esx_notify
local function Notify(notificatonType, length, message)
if Debug then
print("1 ".. tostring(notificatonType))
print("2 "..tostring(length))
print("3 "..message)
end
if type(notificatonType) ~= "string" then
notificatonType = "info"
end
if type(length) ~= "number" then
length = 3000
end
if Debug then
print("4 ".. tostring(notificatonType))
print("5 "..tostring(length))
print("6 "..message)
end
exports['v42-notify']:notify(message, notificatonType, length);
end
Line 88 is diffrent to what you stated in the readme ?
do I replace this whole section with yours?
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
Create fully custom notifications with custom sounds and more features
The originally Notify script had an rewrite, now its compatible with QBCore and ESX
For the lovers you can now change everything to how you want easily in the config.lua !
The notifications are now grouped so you won’t get spammed with the same notify!
Customizable:
Custom Icons
Custom sound
Custom color
Volume of sound
Mute sound or not
All the options are customizable for each notifications!
Ofcourse, if you just want the notification for the paycheck only. Run the export at the place you want.
exports[‘v42-notify’]:notify(‘your message’, ‘success’, 5000);