Overview
v1.3.0nexm_notify is a lightweight standalone UI infrastructure resource for FiveM and the NEXM ecosystem. Version 1.4.0 keeps the existing notification and owner-aware multi-prompt APIs compatible and adds reusable world-space UI panels rendered inside the GTA world.
Resource-specific UI such as phones, tablets, MDTs, job devices and other complex interfaces stays inside the resource that owns it.
Owner-aware multi-prompt registry, automatic resource ownership, prompt IDs, priority and conflict resolution, stacked prompts, HidePrompt(id), HideAllPrompts(), resource-stop cleanup and deterministic in-place updates.
Installation
Place the nexm_notify folder in your server resources directory and add:
ensure nexm_notify
No framework or ox_lib dependency is required.
The release includes complete readable Lua, HTML, CSS and JavaScript source. Lua files remain in escrow_ignore; redistribution and modification terms are defined by the included NEXM Source Available License.
No framework, SQL database or ox_lib dependency is required.
Configuration
Config.DefaultDuration = 5000
Config.Position = 'top-right'
Config.MaxVisible = 4
Config.DuplicateWindow = 750
Config.AllowPlayerPositioning = true
Config.PositionCommand = 'nexmnotifyposition'
Config.Prompts = {
enabled = true,
defaultPosition = 'bottom-center',
defaultPriority = 50,
maxVisible = 3,
allowPlayerPositioning = true,
positionCommand = 'nexmpromptposition'
}
Config.WorldUI = {
enabled = true,
renderDistance = 20.0,
renderCheckInterval = 250,
orientationLock = true,
enableFrontCull = true,
enableCandidateScan = true,
enableCamForwardCull = true,
debugCommands = false
}
Config.Debug = false
Notification types
Notification positions
The production package ships with Config.Debug = false.
Notification API
Client export — table form
exports['nexm_notify']:Notify({
type = 'success',
title = 'Success',
message = 'Action completed successfully.',
duration = 5000,
id = 'optional-id'
})
Client export — short form
exports['nexm_notify']:Notify(
'success',
'Action completed',
5000
)
Client event
TriggerEvent('nexm_notify:notify', {
type = 'info',
message = 'Your status was updated.'
})
Server → client
TriggerClientEvent('nexm_notify:notify', source, {
type = 'success',
message = 'Your action was completed.'
})
Notification Position
When player positioning is enabled, each player can move their own notification stack:
/nexmnotifyposition
The editor provides Confirm, Reset to default, Cancel and Esc handling. The selected normalized position is stored locally with FiveM KVP.
The saved notification position survives reconnects, resource restarts, server restarts and normal FiveM restarts unless the player's local FiveM data is cleared.
Queue & Validation
With the default Config.MaxVisible = 4, additional notifications wait in the browser-side queue. Duplicate/spam suppression is controlled by Config.DuplicateWindow.
Interaction Prompt API
Interaction prompts are display-only. NEXM Notify does not handle the gameplay key shown in the prompt. The calling resource remains responsible for E, G or any other control and for all gameplay logic.
Prompts are stored by calling resource owner plus prompt id. Different resources can display prompts at the same time without overwriting each other. Calls made through exports automatically detect the owner with GetInvokingResource().
ShowPrompt(data)
local ok = exports['nexm_notify']:ShowPrompt({
id = 'pestcontrol_depot',
key = 'E',
label = 'RETURN WORK VEHICLE',
description = 'End shift and restore your clothes',
priority = 80,
conflictKeys = { 'E' }
})
label is required. id, key, description, icon, position, priority and conflictKeys are optional. If no id is supplied, the calling resource uses its own default prompt ID.
Calling ShowPrompt again with the same owner + id updates that prompt. Other resources and other IDs remain independent. Identical resolved states are suppressed so repeated frame-level calls do not resend unchanged NUI state.
Priority & conflicts
priority controls which prompts win when inputs conflict. The default is Config.Prompts.defaultPriority = 50. If conflictKeys is omitted, the prompt key is used as its default conflict token. Ties are resolved deterministically to avoid UI flicker.
Up to Config.Prompts.maxVisible prompts are shown in a vertical stack; the shipped default is 3.
UpdatePrompt(data)
exports['nexm_notify']:UpdatePrompt({
id = 'pestcontrol_depot',
key = 'E',
label = 'START SHIFT',
priority = 80
})
UpdatePrompt updates the calling resource's matching prompt in place and returns false when the target prompt does not exist or the new data is invalid.
HidePrompt(id)
exports['nexm_notify']:HidePrompt('pestcontrol_depot')
Removes only the calling resource's matching prompt. Omitting id targets that resource's default prompt ID.
HideAllPrompts()
exports['nexm_notify']:HideAllPrompts()
Removes every prompt owned by the calling resource without affecting prompts created by other resources.
Client events
TriggerEvent('nexm_notify:client:showPrompt', {
id = 'example',
key = 'E',
label = 'START SHIFT',
priority = 50
})
TriggerEvent('nexm_notify:client:updatePrompt', {
id = 'example',
label = 'START TREATMENT'
})
TriggerEvent('nexm_notify:client:hidePrompt', 'example')
Exports are preferred because v1.4.0 can automatically identify the invoking resource owner. On resource stop, only prompts owned by that stopped resource are removed.
Prompt Position
Supported prompt presets:
The configured default is bottom-center. Invalid preset positions fall back to Config.Prompts.defaultPosition.
If a player has saved a custom prompt position, that personal position overrides the preset requested by a resource so the player's UI preference remains consistent across NEXM resources.
Per-player prompt editor
/nexmpromptposition
The editor shows a real NEXM prompt preview that can be dragged inside the viewport. Prompt position and notification position are separate KVP settings: moving one does not move the other.
Normal prompts never call SetNuiFocus. Focus is enabled only while a player explicitly opens a position editor and is released when the editor closes.
World-space UI API
Version 1.4.0 adds reusable DUI panels that are positioned and rendered in GTA world space. World geometry and peds can occlude the panel naturally instead of the interface always drawing above the scene.
CreateWorldPanel(opts)
local panelId = exports['nexm_notify']:CreateWorldPanel({
id = 'repair_bench_12',
url = 'nui://nexm_factoryworks/web/workstation.html',
resW = 1280,
resH = 480,
pos = vector3(0.0, 0.0, 1.0),
normal = vector3(0.0, -1.0, 0.0),
width = 1.75,
height = 0.66,
billboard = 'yaw',
renderDistance = 8.0
})
Update panel data
exports['nexm_notify']:SetPanelData(panelId, {
title = 'REPAIR WORKBENCH',
status = 'Waiting for worker',
completed = 3,
total = 11,
remaining = 166
})
Destroy a panel
exports['nexm_notify']:DestroyPanel(panelId)
Main panel exports
CreatePanel / CreateWorldPanel, DestroyPanel, SetPanelTransform, SetPanelSize, SetPanelUrl, SetPanelAlpha, SetPanelEnabled and SetPanelRenderDistance.SetPanelBillboard, SetPanelFacing, SetPanelDepthCompensation and SetPanelZOffset.SetPanelData / SendMessage, RaycastPanel / RaycastPanels, mouse forwarding and focus helpers such as BeginFocus and EndFocus.Panels are owner-aware and are cleaned up automatically when the resource that created them stops.
Development test commands
Set Config.WorldUI.debugCommands = true only while developing. Then use:
/nexmworldui_test
/nexmworldui_off
Set Config.WorldUI.debugCommands = false again for production.
NEXM Core Integration
NEXM Core hotfix.4 retains the official nexm_notify notification provider contract introduced on the hotfix.2 line. The supplied Core documentation names NEXM Notify v1.0.3 as its recorded provider baseline.
The notification exports, events and queue remain compatible. Version 1.4.0 keeps the v1.3 prompt improvements and expands the resource with owner-aware multi-prompt handling, priorities and conflict resolution. NEXM ecosystem products can continue using NEXM.Notify.Send(...) for notifications.
For direct standalone integrations, the notification export and nexm_notify:notify event remain available. Prompt exports are client-side and are separate from Core's normalized notification API.
Debug
Debug commands are disabled by default in the production package. Temporarily set Config.Debug = true and restart nexm_notify to enable:
/nexmnotifytest
/nexmprompttest
/nexmprompthide
Set Config.Debug = false again after testing.
Security & Performance
textContent, not untrusted innerHTML.Wait(0) loop is used.Hot Restart
restart nexm_notify
The resource is designed to hot-restart independently of nexm_core. A restart clears active prompt and world-panel state cleanly; saved personal prompt and notification positions remain in local FiveM KVP and are restored afterwards.
Need help with NEXM Notify?
Use the support page for configuration, API or integration questions.
Open Support