OrigenNetwork
Docs

Exports · origen_notify

All exports are registered under the resource name origen_notify.


Server-side exports

ShowNotification(pID, message, type, length)

Send a toast notification to a specific player from the server.

lua
exports["origen_notify"]:ShowNotification(source, "Your vehicle has been impounded", "warning")
ParameterTypeDescription
pIDnumberPlayer server ID. Must not be nil.
messagestringText displayed in the notification.
typestring | nilNotification style. Accepted values: "success", "warning", "error", "business". Leave nil for the default style.
lengthnumber | nilDuration in milliseconds. Defaults to 5000 if not provided.

If pID is nil the export prints an error to the server console and exits early. Always pass a valid player source.


Client-side exports

ShowNotification(message, type, timeout)

Display a toast notification on the local player's screen.

lua
exports["origen_notify"]:ShowNotification("You received $500", "success")
exports["origen_notify"]:ShowNotification("Low health", "warning", 8000)
ParameterTypeDescription
messagestringText displayed in the notification.
typestring | nilNotification style: "success", "warning", "error", "business", or nil for default.
timeoutnumber | nilDuration in milliseconds. Defaults to 5000.

CreateHelp(key, text)id

Display a key-hint help notification (bottom-left style). Returns a unique ID needed to update or remove it later.

lua
local id = exports["origen_notify"]:CreateHelp("E", "Press to open the shop")
ParameterTypeDescription
keystringThe key label shown on the hint (e.g. "E", "F", "G"). Required — returns nil if omitted.
textstringDescription text shown next to the key.

Returns id (string) — unique identifier for this notification.


UpdateHelp(id, key, text)

Update the key label and text of an existing help notification.

lua
exports["origen_notify"]:UpdateHelp(id, "G", "Press to close")
ParameterTypeDescription
idstringID returned by CreateHelp.
keystringNew key label.
textstringNew description text.

RemoveHelp(id)

Remove a help notification by its ID.

lua
exports["origen_notify"]:RemoveHelp(id)
ParameterTypeDescription
idstringID returned by CreateHelp.

SetQueueMax(max)

Set the maximum number of toast notifications that can be displayed in the queue at the same time.

lua
exports["origen_notify"]:SetQueueMax(5)
ParameterTypeDescription
maxnumberMaximum simultaneous notifications in the queue.

StatusNotify(enabled)

Enable or disable a status notification mode that pauses the queue until it is turned off. Used internally to prevent overlapping notifications during transitions.

lua
exports["origen_notify"]:StatusNotify(true)  -- pause queue
exports["origen_notify"]:StatusNotify(false) -- resume queue
ParameterTypeDescription
enabledbooleantrue to pause the notification queue, false to resume.