SY_Notify
V 2.2
CREATE TABLE IF NOT EXISTS `sy_notify` (
`identifier` varchar(65) DEFAULT NULL,
`position` longtext DEFAULT NULL,
UNIQUE KEY `identifier` (`identifier`) USING HASH
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ensure SY_Notify
in you're server.cfgTo display a notification you should call it like below:
exports['SY_Notify']:Alert("Title", "Message", Time, 'type')
TriggerClientEvent('SY_Notify:Alert', source, "Title", "Message", Time, 'type')
To set the notification display time, use:
[1 second]
[2 seconds]
[5 seconds]
[10 seconds]
To change the type of notification, use this types of notifications:
IF YOU NEED TO ADD THIS NOTIFICATION AS DEFAULT IN ESX LEGACY ADD THE GIVEN CODE IN @es_extended/client/function.lua
function ESX.ShowNotification(message, type, length)
if GetResourceState("esx_notify") ~= "missing" then
exports["esx_notify"]:Notify(type, length, message)
else
print("[^1ERROR^7] ^5ESX Notify^7 is Missing!")
end
end
replace it with
function ESX.ShowNotification(message, type, length)
if GetResourceState("SY_Notify") ~= "missing" then
exports['SY_Notify']:Alert("NOTIFICATION", message, length, type)
else
print("[^1ERROR^7] ^5SY_NOTIFY^7 is Missing!")
end
end