OrigenNetwork
Docs

Custom · origen_notify

text
custom/
└── main.lua   ← open, not escrow-protected

The custom/main.lua file is the only editable entry point in origen_notify. It is loaded as a client script and runs in the same context as the rest of the resource. Use it to test notifications or wire up integrations without modifying the core files.


custom/main.lua

The file ships with a set of test commands that demonstrate every notification type and the help key system. You can remove or extend them freely.


Test commands (included by default)

CommandWhat it does
/test-keyCreates a help key notification (E · Press to do something), waits 5 seconds, then removes it
/notify-successShows a success toast notification
/notify-warningShows a warning toast notification
/notify-errorShows an error toast notification
/notify-businessShows a business toast notification
/notifyShows a default (no type) toast notification

Example — creating and removing a help key

lua
local id = exports["origen_notify"]:CreateHelp("E", "Press to interact")
Wait(5000)
exports["origen_notify"]:RemoveHelp(id)

CreateHelp returns a unique ID. Always store it if you need to update or remove the notification later.


Example — toast notifications

lua
-- Types: "success" | "warning" | "error" | "business" | nil (default)
exports["origen_notify"]:ShowNotification("Operation completed", "success")
exports["origen_notify"]:ShowNotification("Low armor warning", "warning")
exports["origen_notify"]:ShowNotification("Action failed", "error")
exports["origen_notify"]:ShowNotification("Benny's just opened", "business")
exports["origen_notify"]:ShowNotification("Generic message")  -- no type = default style

All exports in custom/main.lua are client-side. For server-side notifications (sending a notify to a specific player), use the server export documented in the Exports page.