F5 StudioF5 Studio
Skip to main content

Configuration

All options are in config.lua (declared as a shared script, but only the client reads it).

config.lua
Config = {}

Config.Position = 'bottom-center'
Config.Duration = 6000
Config.MaxVisible = 5
Config.Scale = 0.5
Config.ZIndex = 99998
Config.Title = 'NOTIFICATION'
Config.DedupeWindow = 150
Config.HookQBCore = false
Config.HookESX = false

Config.Sound = {
enabled = true,
file = 'digital-quick-tone.ogg',
volume = 0.1,
}

General

KeyTypeDefaultWhat it does
Config.Positionstring'bottom-center'Default position when a call does not specify one, or specifies an unknown one. Must be one of Config.Positions
Config.Durationnumber (ms)6000Default display time. The NUI enforces a minimum of 1500 ms on every card
Config.MaxVisiblenumber5Cards shown at the same time per position. Further cards wait in that position's queue
Config.Scalenumber0.5Size of the card relative to the original 1080p mock-up (1.0 = full size, 0.5 = half). Font sizes are rounded to whole pixels with a floor of 10 px for the message and 9 px for the title
Config.Titlestring'NOTIFICATION'Title shown when a call has neither title nor caption
Config.DedupeWindownumber (ms)150If the same message, type and title arrive again within this window, the second call is dropped. Protects against a notification routed through two paths. 0 disables
Config.ZIndexnumber or false99998Z-index of the notification frame among all NUI frames. 99998 is above every HUD and chat and just below the resource that currently has NUI focus (FiveM gives that one 99999). Re-applied every 250 ms because each SetNuiFocus call re-stacks all frames. false disables. Needs a client with the SetNuiZindex native; older clients ignore it
Config.HookQBCorebooleanfalseRegisters a handler for the QBCore:Notify net event. Only for servers that did not patch qb-core; otherwise every server-sent notification shows twice
Config.HookESXbooleanfalseRegisters handlers for esx:showNotification and esx:showAdvancedNotification. Skipped automatically if the resource is named esx_notify. Leave off when es_extended is patched

Sound

KeyDefaultWhat it does
Config.Sound.enabledtrueMaster switch, sent to the NUI once at start
Config.Sound.file'digital-quick-tone.ogg'File in html/sounds played for every card that does not override it
Config.Sound.volume0.10 to 1

Files shipped in html/sounds: digital-quick-tone.ogg (default), confirmation-tone.ogg, correct-answer-tone.ogg. Add your own .ogg to that folder and reference it by name. A per-type sound key in Config.Types and a per-call sound field override the default; sound = false in a call mutes that one card.

Positions

Config.Positions lists the nine valid values. Each has its own stack and queue.

config.lua
Config.Positions = {
'top-left', 'top-center', 'top-right',
'left-center', 'center', 'right-center',
'bottom-left', 'bottom-center', 'bottom-right',
}

Cards enter from the side they are anchored to: from the right on the right-hand positions, from the left on the left-hand ones, from the top or bottom for the centre columns, and with a scale-and-blur fade for center.

Types

Each type has an icon in html/icons and an accent colour used for the bar and the ×N counter.

TypeIconColour
carcar.png#c054f6
errorerror.png#ea3052
heartheart.png#af4ef6
househouse.png#2da7f7
infoinfo.png#c178f7
locationlocation.png#c75cf6
moneymoney.png#f5ae20
objectiveobjective.png#765ef6
questionquestion.png#2799f6
successsuccess.png#45d577
warningwarning.png#f58d1d

To add a type, add an entry mytype = { icon = 'mytype.png', color = '#hex' } and drop the PNG into html/icons (320 × 320 with transparency, like the shipped ones). An optional sound = 'file.ogg' gives the type its own sound.

Aliases

Config.Aliases maps the type names used by frameworks and other scripts onto the types above. Lookups are case-insensitive; an unknown name falls back to info.

AliasBecomes
primary, inform, informationinfo
warnwarning
failerror
police, target, missionobjective
ambulanceheart
cash, bankmoney
vehiclecar
home, propertyhouse
gpslocation