Notify
Installation
No SQL and no dependencies. Drop it in, start it early and call it from your scripts.
Steps
1
Copy the resource
Place the
dh_notify folder in your resources directory.2
Add to server.cfg
Start it before any resource that sends notifications.
3
Turn off test commands
Set
Config.TestCommands = false once you've tried them.4
Point your scripts at it
Use the export or event below, or set it as the notify option in scripts that support a custom notify.
server.cfg
server.cfg
ensure dh_notify
Usage
Arguments: text, time (ms), type, and optional options.
client.lua
-- export
exports['dh_notify']:Notify('Your car has been stored.', 5000, 'save')
-- event
TriggerEvent('dh-notification', 'Payment received.', 5000, 'dhbank')
server.lua
TriggerClientEvent('dh-notification', source, 'You have a new bill.', 5000, 'bill')
Options (twt and msg only)
client.lua
exports['dh_notify']:Notify('Just landed in Los Santos', 5000, 'twt', {
twtName = 'DirtyHalo'
})
exports['dh_notify']:Notify('Meet me at the docks', 5000, 'msg', {
msgNumber = '512-2432'
})
Exports use the folder name. If you rename the resource, change
exports['dh_notify'] to match.Troubleshooting
Nothing shows — The player may have hidden notifications in
/notifysettings."No such export Notify" — The export name must match the folder name —
exports['dh_notify'].Preferences reset — They're saved to
preferences.json inside the resource. Make sure the server can write to that file, and don't overwrite it when updating.