OPX//77
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

Returns

  • Result — errors invalid_text, invalid_options
Example
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 — error invalid_preset

Lib.Notify.Clear

Empties a channel, including another resource's notification.

Lib.Notify.Clear(channel)

Parameters

  • channel?: 'ingame' | 'menu'
    • Default: 'ingame'.

Returns

  • Result — error invalid_channel

On this page