opx_lib
Lib.Notify
Last updated on
The game's own HUD notifications, in one line.
Permission ui.vanilla.hud. These are the game's HUD notifications, not the opx_infinity toasts. There is one vanilla slot per channel, shared with every resource.
Lib.Notify.Show
Queues a notification.
Lib.Notify.Show(text, options)Parameters
- text:
string- 1–512 bytes.
- options?:
table- replace?:
boolean— replace what is on screen instead of queueing
- replace?:
Returns
Result— errorsinvalid_text,invalid_options
Lib.Notify.Show('Order ready')Lib.Notify.Replace
Show with replace = true.
Lib.Notify.Replace(text)Parameters
- text:
string
Returns
Result
Lib.Notify.Preset
Shows one of the engine's localised notifications.
Lib.Notify.Preset(preset)Parameters
- preset:
string
Returns
Result— errorinvalid_preset
Lib.Notify.Clear
Empties a channel, including another resource's notification.
Lib.Notify.Clear(channel)Parameters
- channel?:
'ingame' | 'menu'- Default:
'ingame'.
- Default:
Returns
Result— errorinvalid_channel