Events

The window events of TopXBridge, with their arguments and an example

2 min read · Updated Dec 3, 2026

TopXBridge is a library and has no exports: a script loads it and uses TopX.<module> (see the Overview). Its window also listens to three local client events. Inside a TopX script use TopX.notify and TopX.textui, which respect the provider chosen in config.lua. From any other script you can use the events to show the TopX window directly.

Client events

TopXBridge:notify

Shows the TopX notification card.

Side: Client

Fires when: you trigger it.

Arguments

NameTypeRequiredDescription
kindstringYessuccess, error or info.
textstringYesThe message. Nothing is shown when it is not a string.
accentstringNoHex colour of the window, for example #327bf7.
durationnumberNoMilliseconds on screen, 4000 by default.

How to use it

lua
TriggerEvent('TopXBridge:notify', 'success', 'Package delivered', '#327bf7', 5000)

Good to know

  • It is a local event: TriggerClientEvent from the server does not reach it. Send your own event to the client and trigger this one there.

TopXBridge:textui

Shows or hides the key prompt, like [E] Open.

Side: Client

Fires when: you trigger it.

Arguments

NameTypeRequiredDescription
prompttable or falseYes{ key: string, text: string } to show it, false to hide it.
accentstringNoHex colour of the window, for example #327bf7.

How to use it

lua
TriggerEvent('TopXBridge:textui', { key = 'E', text = 'Open the garage' })
TriggerEvent('TopXBridge:textui', false)

TopXBridge:hint

Shows or hides the list of controls used by the placement tool.

Side: Client

Fires when: you trigger it.

Arguments

NameTypeRequiredDescription
hinttable or falseYes{ title: string, lines: table } to show it, false to hide it. Each line is a string like **E** Confirm.
accentstringNoHex colour of the window, for example #327bf7.

How to use it

lua
TriggerEvent('TopXBridge:hint', {
    title = 'Placing a zone',
    lines = { '**ENTER** Confirm', '**BACKSPACE** Cancel' },
})

TriggerEvent('TopXBridge:hint', false)