Configuration

Every option in config.lua, explained.

Everything is set in config.lua. This page goes through each section.

General

lua
-- top-left, top-center, top-right, center-left, center-right, bottom-left, bottom-center, bottom-right
Config.Position = 'top-right'
Config.Theme = 'dark'            -- 'dark' or 'light'
Config.Glass = true              -- frosted glass cards, false for solid cards
Config.AccentColor = '#0A84FF'   -- used for announcements and the text UI
Config.DefaultDuration = 5000    -- ms
Config.MaxVisible = 5            -- per position, oldest is dropped first
Config.Stack = true              -- identical notifications merge into one stacked card
Config.Sounds = true

Config.TestCommand = 'notifytest' -- shows one of everything, false to disable

Solid cards are easier to read on bright scenes. Players whose system asks for reduced transparency get solid cards automatically.

Config.Sounds = false turns off every sound: notifications, alerts and announcements.

History

lua
Config.History = {
    Enabled = true,
    Max = 50,
    Command = 'notifications',
}

Players open the history with /notifications. It keeps the last Max notifications, alerts and announcements. See Notifications.

Types

lua
Config.Types = {
    success = { label = 'Success', color = '#30D158', icon = 'check',   sound = { 'CHECKPOINT_PERFECT', 'HUD_MINI_GAME_SOUNDSET' } },
    error   = { label = 'Error',   color = '#FF453A', icon = 'x',       sound = { 'ERROR', 'HUD_FRONTEND_DEFAULT_SOUNDSET' } },
    info    = { label = 'Info',    color = '#0A84FF', icon = 'info',    sound = { 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET' } },
    warning = { label = 'Warning', color = '#FF9F0A', icon = 'warning', sound = { 'CHECKPOINT_MISSED', 'HUD_MINI_GAME_SOUNDSET' } },
    police  = { label = 'Police',  color = '#0A84FF', icon = 'shield',  sound = { 'TIMER_STOP', 'HUD_MINI_GAME_SOUNDSET' }, blip = 3 },
    ems     = { label = 'EMS',     color = '#FF453A', icon = 'cross',   sound = { 'TIMER_STOP', 'HUD_MINI_GAME_SOUNDSET' }, blip = 1 },
    fire    = { label = 'Fire',    color = '#FF9F0A', icon = 'flame',   sound = { 'TIMER_STOP', 'HUD_MINI_GAME_SOUNDSET' }, blip = 17 },
}

Every type works for both notifications and dispatch alerts, and you can add your own.

FieldWhat it does
labelThe name shown on dispatch alerts and blips
colorThe icon color
iconA built-in icon, or any free Font Awesome name, like 'car' or 'fa-solid fa-car'
soundA GTA frontend sound as { name, soundSet }, or false
blipThe blip color for dispatch alerts of this type

Built-in icons: check, x, info, warning, shield, cross, flame, bell, megaphone, pin, phone, money, car, clock and bolt.

Type aliases

lua
Config.TypeAliases = {
    inform = 'info', primary = 'info', neutral = 'info', alert = 'info', phonemessage = 'info',
    warn = 'warning', danger = 'error', ambulance = 'ems', doctor = 'ems', medic = 'ems',
}

Other scripts use their own type names. These map them to the types above. A type that isn't listed anywhere shows as info.

Dispatch alerts

lua
Config.Alerts = {
    Position = 'top-left',
    Duration = 12000,
    MaxVisible = 3,
    WaypointKey = 'G',
    OnDutyOnly = true,
    Blip = {
        Enabled = true,
        Sprite = 161,
        Scale = 1.2,
        Time = 60,               -- seconds
        Flash = true,
    },
}
OptionWhat it does
WaypointKeyThe default key to set a waypoint to the latest alert. Players can change it in Settings > Key Bindings > FiveM
OnDutyOnlyJob alerts only reach players on duty (Qbox and QBCore)
Blip.TimeHow long the blip stays on the map

See Dispatch alerts.

Announcements

lua
Config.Announce = {
    Command = 'announce',
    Ace = 'mayo_notify.announce',
    Duration = 10000,
    ShowAuthor = true,
    Sound = { 'Event_Start_Text', 'GTAO_FM_Events_Soundset' },
}

Set Command = false to remove /announce. ShowAuthor puts the staff member's name under the announcement. See Announcements.

Text UI

lua
Config.TextUI = {
    Position = 'center-left',
}

Text

lua
Config.Locale = {
    waypoint = 'Set Waypoint',
    waypointSet = 'Waypoint Set',
    announcement = 'Announcement',
    notifications = 'Notifications',
    clear = 'Clear',
    close = 'Close',
    empty = 'No Older Notifications',
    now = 'now',
    today = 'Today',
    noPermission = 'You do not have permission to do that.',
    priority = { high = 'Critical', medium = 'Urgent', low = 'Low' },
}

Change any of these to translate Mayo Notify.