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.
exports["origen_notify"]:ShowNotification(source, "Your vehicle has been impounded", "warning")| Parameter | Type | Description |
|---|---|---|
pID | number | Player server ID. Must not be nil. |
message | string | Text displayed in the notification. |
type | string | nil | Notification style. Accepted values: "success", "warning", "error", "business". Leave nil for the default style. |
length | number | nil | Duration 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.
exports["origen_notify"]:ShowNotification("You received $500", "success")
exports["origen_notify"]:ShowNotification("Low health", "warning", 8000)| Parameter | Type | Description |
|---|---|---|
message | string | Text displayed in the notification. |
type | string | nil | Notification style: "success", "warning", "error", "business", or nil for default. |
timeout | number | nil | Duration 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.
local id = exports["origen_notify"]:CreateHelp("E", "Press to open the shop")| Parameter | Type | Description |
|---|---|---|
key | string | The key label shown on the hint (e.g. "E", "F", "G"). Required — returns nil if omitted. |
text | string | Description 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.
exports["origen_notify"]:UpdateHelp(id, "G", "Press to close")| Parameter | Type | Description |
|---|---|---|
id | string | ID returned by CreateHelp. |
key | string | New key label. |
text | string | New description text. |
RemoveHelp(id)
Remove a help notification by its ID.
exports["origen_notify"]:RemoveHelp(id)| Parameter | Type | Description |
|---|---|---|
id | string | ID returned by CreateHelp. |
SetQueueMax(max)
Set the maximum number of toast notifications that can be displayed in the queue at the same time.
exports["origen_notify"]:SetQueueMax(5)| Parameter | Type | Description |
|---|---|---|
max | number | Maximum 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.
exports["origen_notify"]:StatusNotify(true) -- pause queue
exports["origen_notify"]:StatusNotify(false) -- resume queue| Parameter | Type | Description |
|---|---|---|
enabled | boolean | true to pause the notification queue, false to resume. |