Documentation/NEXM Notify
NEXM NOTIFY / DEVELOPER DOCUMENTATION

NEXM Notify

Standalone NEXM UI infrastructure for notifications, reusable interaction prompts and world-space UI panels with per-player positioning where applicable.

v1.3.0StandaloneFull readable source
Verified documentationUpdated from the supplied NEXM Notify v1.3.0 full-source package.
NEXM NOTIFY

Overview

v1.3.0

nexm_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.

Framework dependencyNone
ox_lib dependencyNone
PersistenceLocal FiveM KVP
SourceReadable Lua / HTML / CSS / JS
What's new in 1.3.0

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.

NEXM NOTIFY

Installation

Place the nexm_notify folder in your server resources directory and add:

SERVER.CFGcfg
ensure nexm_notify

No framework or ox_lib dependency is required.

Source availability

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.

NEXM NOTIFY

Configuration

CONFIG.LUALua
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

successerrorwarninginfodefault

Notification positions

top-righttop-leftbottom-rightbottom-left

The production package ships with Config.Debug = false.

NEXM NOTIFY

Notification API

Client export — table form

CLIENTLua
exports['nexm_notify']:Notify({
    type = 'success',
    title = 'Success',
    message = 'Action completed successfully.',
    duration = 5000,
    id = 'optional-id'
})

Client export — short form

CLIENTLua
exports['nexm_notify']:Notify(
    'success',
    'Action completed',
    5000
)

Client event

CLIENTLua
TriggerEvent('nexm_notify:notify', {
    type = 'info',
    message = 'Your status was updated.'
})

Server → client

SERVERLua
TriggerClientEvent('nexm_notify:notify', source, {
    type = 'success',
    message = 'Your action was completed.'
})
NEXM NOTIFY

Notification Position

When player positioning is enabled, each player can move their own notification stack:

CLIENT COMMANDtext
/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.

NEXM NOTIFY

Queue & Validation

With the default Config.MaxVisible = 4, additional notifications wait in the browser-side queue. Duplicate/spam suppression is controlled by Config.DuplicateWindow.

MessageRequired; max 300 characters by default.
TitleOptional; max 80 characters by default.
Duration1000–30000 ms by default.
Gameplay focusNormal notifications do not steal gameplay focus.
Duplicate suppressionRepeated notification spam is suppressed client-side.
NUI textRendered as text, not untrusted HTML.
NEXM NOTIFY

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.

Multi-prompt behavior in v1.3.0

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)

CLIENTLua
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)

CLIENTLua
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)

CLIENTLua
exports['nexm_notify']:HidePrompt('pestcontrol_depot')

Removes only the calling resource's matching prompt. Omitting id targets that resource's default prompt ID.

HideAllPrompts()

CLIENTLua
exports['nexm_notify']:HideAllPrompts()

Removes every prompt owned by the calling resource without affecting prompts created by other resources.

Client events

CLIENT EVENTSLua
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.

NEXM NOTIFY

Prompt Position

Supported prompt presets:

bottom-centerbottom-leftbottom-rightcenter-leftcenter-right

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

CLIENT COMMANDtext
/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.

Focus behavior

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

Lifecycle & layoutCreatePanel / CreateWorldPanel, DestroyPanel, SetPanelTransform, SetPanelSize, SetPanelUrl, SetPanelAlpha, SetPanelEnabled and SetPanelRenderDistance.
Facing & renderingSetPanelBillboard, SetPanelFacing, SetPanelDepthCompensation and SetPanelZOffset.
Data & interactionSetPanelData / SendMessage, RaycastPanel / RaycastPanels, mouse forwarding and focus helpers such as BeginFocus and EndFocus.
Advanced attachmentEntity/bone attachment helpers, projected decal helpers and replace-texture helpers are included for advanced integrations.

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 NOTIFY

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.

Notify 1.3.0 keeps the existing notification contract

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.

NEXM NOTIFY

Debug

Debug commands are disabled by default in the production package. Temporarily set Config.Debug = true and restart nexm_notify to enable:

CLIENT COMMANDStext
/nexmnotifytest
/nexmprompttest
/nexmprompthide

Set Config.Debug = false again after testing.

NEXM NOTIFY

Security & Performance

Text renderingNotification and prompt text uses textContent, not untrusted innerHTML.
Input boundsInput lengths are limited; invalid data is rejected or normalized.
Prompt positionsValidated and clamped before saving.
Frame loopsNo permanent Wait(0) loop is used.
PersistenceNo SQL, framework or server-side persistence is required for UI positions.
Gameplay inputNormal interaction prompts do not capture input.
NEXM NOTIFY

Hot Restart

SERVER CONSOLEtext
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.

SUPPORT

Need help with NEXM Notify?

Use the support page for configuration, API or integration questions.

Open Support