Lt Notify
Resource: lt-notify. Free. Protected with Asset Escrow; config.lua, locales/ and client/compat.lua stay open.
Changelog: what is new in each version →
Languages: English (default), Spanish, German and French. Chosen in Config.Locale; 'auto' follows your base locale.
Requirements
None. Works standalone and with qs-core, QBCore, Qbox, ESX and ox_lib.
Installation
- Download the script from Keymaster → Granted Assets with the Cfx.re account that claimed it.
- Copy the
lt-notifyfolder intoresources/. - Add it to
server.cfg:
ensure lt-notify
To make your other scripts use Lt Notify, see Replacing your framework's notifications.
Player menu
With /notify, each player picks a preset position or drags notifications anywhere on screen, and chooses the sound for each type from the ones the server offers, with its volume or muted. It is saved on their own client.
The command is changed or disabled in Config.Command (false removes it). To stop players moving notifications: Config.AllowPlayerMove = false.
Sending notifications
From the client
exports['lt-notify']:Notify({ type = 'success', title = 'Bank', message = 'You received **$500**' })
exports['lt-notify']:Notify('Simple message', 'error', 5000) -- short form
From the server
exports['lt-notify']:Notify(source, { type = 'info', message = 'Hello' })
exports['lt-notify']:Notify(-1, { type = 'announce', title = 'Server', message = 'Restart in 10 min' })
exports['lt-notify']:NotifyMany({ 1, 2, 3 }, 'Notice for several players', 'warning')
| Field | Purpose |
|---|---|
type | Notification type (see below) |
title | Optional title |
message / description | Text |
duration | Duration in ms |
icon | Icon from web/js/icons.js |
color | Hex colour |
sound | Key of Config.Sounds, or false for none |
id | Does not repeat the notification while visible (like ox_lib) |
Types: success, error, info, warning, police, ems and announce. It also accepts other scripts' names: inform, primary, danger, warn, ambulance…
Allowed formatting: colours ~r~ ~g~ ~b~ ~y~ ~p~ ~o~ ~c~ ~w~, ~s~ (reset), ~n~ (line break) and **bold**. Text is never parsed as HTML, so nobody can inject code.
Replacing your framework's notifications
Make your framework call Lt Notify and do not enable Config.Compat, or every notification will show twice.
- qs-core (
client/main.lua, eventqs:client:notify), first line of the handler. qs-core's QBCore and ESX bridges go through it too:
if GetResourceState('lt-notify') == 'started' then
return exports['lt-notify']:Notify({ message = message, type = nType, duration = duration, title = title })
end
- QBCore / Qbox: inside
QBCore.Functions.Notify→exports['lt-notify']:Notify(text, texttype, length) - ESX: inside
ESX.ShowNotification→exports['lt-notify']:Notify(message, notifyType, length) - ox_lib: inside
lib.notify→exports['lt-notify']:Notify(data)
If you'd rather not touch the framework, Config.Compat listens to its network events (qs, qbcore, esx, oxlib), but the original notification will still show too.
Sounds
Only the server adds sounds; players choose among them in /notify. In Config.Sounds each sound can be:
synth: built-in tone, no file (chime,pop,soft,buzz,alert,bell).game: GTA sound,{ name, set }.file: your own file inweb/sounds/(ogg, mp3 or wav).
To add your own: copy the file to web/sounds/, add it to Config.Sounds (my_sound = { label = 'My sound', file = 'my_sound.ogg' }) and assign it to a type in Config.Types, or let players pick it.
Configuration
| Option | Purpose |
|---|---|
Config.Positions | Preset positions in % of the screen. Tweak the numbers without creating a new one |
Config.DefaultPosition | Server default position (bottom-center) |
Config.DefaultDuration | Default duration (5000 ms) |
Config.MaxVisible | Maximum at once (5); the rest wait in a queue, announcements first |
Config.GroupDuplicates | Groups repeated notices into one card with ×2, ×3… |
Config.MaxTitleLength / Config.MaxMessageLength | Maximum title (60) and text (300) length |
Config.Types | Colour, icon, sound and duration of each type. You can add your own |
Config.TypeAliases | Alternative names other scripts use |
Config.DefaultVolume | Starting volume (0.0 – 1.0) |
Troubleshooting
Every notification shows twice
You enabled Config.Compat for a framework that already calls Lt Notify, or the original notification is still active. Use only one of the two ways in Replacing your framework's notifications.
My scripts still use the old notifications
Lt Notify does not replace them on its own: redirect your framework's notify as explained in this section.
A custom sound does not play
Check the file is in web/sounds/, the name matches Config.Sounds, and the player has not muted it in /notify.
Escrow errors (entitlement, verify, parsing)
See the general FAQ.
Support
Still stuck? Open a ticket on our Discord with the script version, your framework and the full console error.