Custom · origen_notify
text
custom/
└── main.lua ← open, not escrow-protectedThe 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)
| Command | What it does |
|---|---|
/test-key | Creates a help key notification (E · Press to do something), waits 5 seconds, then removes it |
/notify-success | Shows a success toast notification |
/notify-warning | Shows a warning toast notification |
/notify-error | Shows an error toast notification |
/notify-business | Shows a business toast notification |
/notify | Shows 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 styleAll 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.