F5 StudioF5 Studio
Skip to main content

Installation

gta6_notify draws card-style notifications: a round icon disc, a dark body with a coloured accent bar that drains as the timer runs out, a small uppercase title and a bold message. It has no framework dependency. Other resources call it through an export or an event, and one line in your framework routes all standard notifications to it.

Requirements

RequirementDetails
FrameworkNone. Optional one-line patches for QBCore and ESX are described below
FiveM ServerAny recent build. Lua 5.4
Client buildThe layering feature uses the SetNuiZindex native (FiveM clients from December 2024). Older clients skip it
DatabaseNone

Step by Step

1. Folder structure

Folder structure
resources/
[gta6]/
gta6_notify/
html/
icons/ (11 PNG icons, one per type)
sounds/ (3 OGG files)
index.html
app.js
style.css
client.lua
config.lua
server.lua
fxmanifest.lua
README.md

Keep the folder name gta6_notify. The export other scripts use (exports.gta6_notify) and the checks in the framework patches depend on it.

2. Server config

server.cfg
ensure gta6_notify

The resource has no dependencies, so it can start before or after your framework.

3. Test

In-game, run:

/gta6notify success
/gta6notify warning top-right

The first argument is a type, the second an optional position. A card with a Polish test message ("Test powiadomienia typu …") should appear.

The resource only covers every script on the server if the framework's own notify function ends up here. Each framework has one place to patch, and in each case the matching Config.Hook… switch must stay false so the same notification is not shown twice.

qb-core draws its notifications from QBCore.Functions.Notify in qb-core/client/functions.lua, and its QBCore:Notify event calls the same function. Add one line at the top of that function:

qb-core/client/functions.lua
function QBCore.Functions.Notify(text, texttype, length, icon)
if GetResourceState('gta6_notify') == 'started' then return exports.gta6_notify:Notify(text, texttype, length) end
local message = {
-- ... rest of the original function

Leave Config.HookQBCore = false (the default). With the hook on, the QBCore:Notify event would be handled by both qb-core and this resource, and every server-sent notification would show as ×2. When gta6_notify is stopped, qb-core falls back to its own cards.

The table form QBCore.Functions.Notify({ text = '...', caption = '...' }, type) is accepted: text becomes the message and caption the title. Because a table as first argument is passed straight through, the separate type argument is ignored in that form; put type = 'success' inside the table if you need a colour other than info.

Safety net

Config.DedupeWindow (150 ms) drops an identical message, type and title arriving twice within the window. If a misconfiguration sends the same notification down two paths, you get one card instead of ×2.

Next steps