☑️Solstice-Notify
https://discord.gg/8Kq6RAKgtF
Getting Started
Select the notify theme youd like to use remove the parenthesis with the theme type and drag and drop into your server
ESX Integration
go to es_extended/client/functions.lua and replace ESX.ShowNotification with the one below
function ESX.ShowNotification(msg, texttype, length)
local convert = {
["primary"] = 'info',
["police"] = 'police',
["ambulance"] = 'ems',
}
if not texttype or type(texttype) ~= "string" then
texttype = 'info'
end
if convert[texttype] then
texttype = convert[texttype]
end
local title = texttype and string.upper(texttype) or "NOTIFY"
TriggerEvent('Solstice:Notify', texttype, title, msg, length or 5000, "top-center") --change to where you want the notification to appear
end
QBCore Integration
go to qbcore/client/functions.lua and replace QBCore.Functions.Notify with the one below
function QBCore.Functions.Notify(text, texttype, length)
local convert = {
["primary"] = 'info',
["police"] = 'police',
["ambulance"] = 'ems',
}
if not texttype then
texttype = 'info'
end
if convert[texttype] then
texttype = convert[texttype]
end
local title = texttype
local position = "top-center" --change to where you want the notification to appear
if type(text) == "table" then
local ttext = text.text or 'Placeholder'
local caption = text.caption or 'Placeholder'
length = length or 5000
title = caption
text = ttext
else
length = length or 5000
end
TriggerEvent('Solstice:Notify', texttype, title, text, length, position)
end
Q-BOX
go to qbx-core/client/functions.lua and replace QBCore.Functions.Notify and QBCore.Functions.NotifyV2 with the one below
function QBCore.Functions.Notify(text, texttype, length)
local convert = {
["primary"] = 'info',
["police"] = 'police',
["ambulance"] = 'ems',
}
if not texttype then
texttype = 'info'
end
if convert[texttype] then
texttype = convert[texttype]
end
local title = texttype
local position = "top-center" --change to where you want the notification to appear
if type(text) == "table" then
local ttext = text.text or 'Placeholder'
local caption = text.caption or 'Placeholder'
length = length or 5000
title = caption
text = ttext
else
length = length or 5000
end
TriggerEvent('Solstice:Notify', texttype, title, text, length, position)
end
function QBCore.Functions.NotifyV2(text, texttype, length)
local convert = {
["primary"] = 'info',
["police"] = 'police',
["ambulance"] = 'ems',
}
if not texttype then
texttype = 'info'
end
if convert[texttype] then
texttype = convert[texttype]
end
local title = texttype
local position = "top-center" --change to where you want the notification to appear
if type(text) == "table" then
local ttext = text.text or 'Placeholder'
local caption = text.caption or 'Placeholder'
length = length or 5000
title = caption
text = ttext
else
length = length or 5000
end
TriggerEvent('Solstice:Notify', texttype, title, text, length, position)
end
TriggerClientEvent
TriggerClientEvent('Solstice:Notify', "type", 'title', 'text', 4000, "top-center")
TriggerClientEvent('Solstice:Notify', -1, "type", 'title', 'text', 5000, "bottom-right")
All positions that are useable call these at the end of the event
top-left,
top-center,
top-left,
middle-right,
middle-center,
middle-left,
bottom-left,
bottom-center,
bottom-right,
Last updated
Was this helpful?