Alamo Studio Logo
Advanced

Notifications

Choose how purchase messages are shown.

Config.Notify controls how messages (purchase success, errors, etc.) are displayed.

config.lua
Config.Notify = {
    system = 'framework',
    title = 'Market',
    duration = 5000,
    options = nil,

    Custom = function(message, notifyType)
        -- exports['my-notify']:Alert(notifyType, message, Config.Notify.duration)
    end,
}
KeyTypeDescription
systemstringWhich notification system to use: 'framework', 'event' or 'custom'.
titlestringTitle used by the event system.
durationnumberHow long notifications stay (ms).
optionsanyExtra options passed to the event system.
CustomfunctionYour handler for the custom system.

system = 'framework' (default)

Uses your framework's built-in notify:

  • ESX: ShowNotification
  • QBCore / QBox: Functions.Notify(message, type, duration)

Nothing extra to set up — recommended for most servers.

system = 'event'

Sends notifications by triggering a client event that your own notification resource listens for:

TriggerClientEvent('your-notify:Notify', source, title, text, type, length, options)

Use this if you run a custom notify resource that reacts to a client event. Point it at whatever event name your resource expects, and the title, duration and options config values are passed along.

The event name above is just an example — replace your-notify:Notify with the event your notification resource actually listens for.

system = 'custom'

Calls your own function for every notification on the client:

config.lua
Config.Notify = {
    system = 'custom',
    duration = 5000,
    Custom = function(message, notifyType)
        exports['my-notify']:Alert(notifyType, message, Config.Notify.duration)
    end,
}
ParamDescription
messageThe text to show.
notifyType'success', 'error', 'info' or 'warning'.
If system = 'custom' but Custom isn't a function, it safely falls back to framework.
The text of each message comes from your locale file, not from Config.Notify. To change wording, edit the notify section of your locale — see Localization.
Copyright © 2026