API
Client export
exports.gta6_notify:Notify(...) accepts three call shapes. The first argument decides which one is used.
-- 1. Table (full control)
exports.gta6_notify:Notify({
message = '+$8,500',
title = 'BANK',
type = 'money',
duration = 6000,
position = 'bottom-right',
})
-- 2. message, type, duration (qb-core order)
exports.gta6_notify:Notify('Vehicle stored', 'car')
exports.gta6_notify:Notify('Not enough money', 'error', 4000)
-- 3. type, length, message (esx_notify order)
exports.gta6_notify:Notify('success', 5000, 'Done')
Shape 3 is recognised when the second argument is a number and the third is a string. Everything else falls into shape 2.
Table fields
| Field | Type | Required | Notes |
|---|---|---|---|
message | string | yes | Also accepted as text or msg. An empty string or a non-string aborts the call |
type | string | no | A type from Config.Types or an alias. Case-insensitive. Unknown → info |
title | string | no | Also accepted as caption. Default Config.Title |
duration | number (ms) | no | Also accepted as length. Default Config.Duration; the NUI enforces at least 1500 ms |
position | string | no | One of the nine positions. Unknown → Config.Position |
color | string | no | Hex colour overriding the type's accent |
icon | string | no | File name from html/icons ('car.png') or a full URL / path containing / or : |
sound | string or false | no | File name from html/sounds or a URL. false mutes this card. Omitted → the type's sound or Config.Sound.file |
A duration given as a string is converted with tonumber.
Client event
TriggerEvent('gta6_notify:client:notify', { type = 'error', message = 'No permission' })
The event takes the same table (or a plain string as the message) and is a net event, so the server can trigger it directly:
TriggerClientEvent('gta6_notify:client:notify', source, { type = 'error', message = 'No permission' })
Server export
exports.gta6_notify:Notify(source, { type = 'success', message = 'Done' })
exports.gta6_notify:Notify(source, 'Done', 'success', 5000)
Signature: Notify(target, data, type, duration). When data is not a table, it is wrapped as { message = data, type = type, duration = duration }. target is passed straight to TriggerClientEvent, so -1 reaches everyone.
Framework hooks
When enabled in the config, the resource listens to:
| Event | Enabled by | Mapping |
|---|---|---|
QBCore:Notify(text, type, length) | Config.HookQBCore | text may be a string or a table with text and caption |
esx:showNotification(msg, type, length) | Config.HookESX | Direct mapping |
esx:showAdvancedNotification(title, subject, msg) | Config.HookESX | title and msg; the subject and icon are ignored |
Both hooks are off by default because the recommended install patches the framework function instead (see Installation).
Command
| Command | Effect |
|---|---|
/gta6notify [type] [position] | Shows a test card. Unknown or missing type → info, unknown or missing position → Config.Position. The message text is Polish ("Test powiadomienia typu …") |