For the complete documentation index, see llms.txt. This page is also available as Markdown.

Developer API

Use the supported Sonoran Station Displays client/server exports and observation events.

Resource name:

sonoran-stationdisplay

Server exports

Server exports are trusted resource-to-resource calls. They do not apply player ACE checks. Never proxy untrusted client input directly into them.

GetDisplays()

local displays = exports["sonoran-stationdisplay"]:GetDisplays()
Property
Value

Side

Server

Parameters

None

Returns

Array of copied display tables

Failure

Empty array when no displays exist

Permission

None; server resource call

GetDisplay(displayId)

local display = exports["sonoran-stationdisplay"]:GetDisplay("ssd-...")
Property
Value

Side

Server

displayId

string

Returns

Copied display table or nil

Failure

nil for an unknown ID

Permission

None; server resource call

RefreshDisplay(displayId)

Property
Value

Side

Server

displayId

string

Returns

boolean

Failure

false for an unknown ID

Behavior

Broadcasts a forced DUI state resend to authorized clients; does not refresh CAD caches

Permission

None; server resource call

SetDisplayPage(displayId, pageId)

Property
Value

Side

Server

displayId

string

pageId

ACTIVE_UNITS, EMERGENCY_CALLS, DISPATCH_CALLS, LIVE_MAP, or BODYCAMS

Returns

boolean

Failure

false for an unknown display or page ID

Behavior

Broadcasts a runtime page request; does not persist current page

Permission

None; server resource call

The receiving client applies the page only when it is in that display's saved pageOrder.

SetDisplayServiceFilter(displayId, serviceFilter)

Property
Value

Side

Server

displayId

string

serviceFilter

LEO, FIRE_EMS, or BOTH

Returns

boolean

Failure

false for an unknown display or filter

Behavior

Persists the filter and broadcasts the updated display

Permission

None; server resource call

Client exports

Client exports act on the local client's synchronized, sanitized display/cache state.

GetDisplays()

Returns an array sorted by display name. Treat returned display tables as read-only.

GetDisplay(displayId)

Returns the local display table or nil. Treat it as read-only.

RefreshDisplay(displayId)

Returns no value. If that display has a local active DUI, its state is resent. It does not request server or CAD data.

SetDisplayPage(displayId, pageId)

Returns true when an active local renderer exists and the page is in its saved order; otherwise false. The change is local and not persisted.

OpenDisplayMenu()

Returns false when placement is already active; otherwise true after opening the non-actionable loading state and requesting a fresh server permission snapshot. Actionable menu opening is asynchronous and still requires the configured menu administrative permission.

Supported client observation events

External client resources may listen to these events. Do not trigger the synchronization events to impersonate server state.

Display configuration lifecycle

Event
Direction
Payload
Fires

sonoranDisplays:client:displayAdded

Server → authorized client

display table

After a persisted create

sonoranDisplays:client:displayUpdated

Server → authorized client

display table

After a persisted update

sonoranDisplays:client:displayRemoved

Server → authorized client

display ID string

After a persisted delete

These are safe to listen to. External resources should mutate displays through supported server exports, not trigger these client events.

Local object lifecycle

Event
Direction
Payload
Fires

sonoranDisplays:client:displaySpawned

Local client

display ID, object handle

After an in-range object is created

sonoranDisplays:client:displayDespawned

Local client

display ID

After local cleanup

Object handles are client-local and can become invalid after the event.

Open the menu

This local event is safe for another client resource to trigger. It performs the same server permission handshake as the command/export.

Runtime page broadcast

Property
Value

Direction

Server → authorized client

Payload

Display ID string, page ID string, hold milliseconds, elapsed milliseconds

Fires

After the server SetDisplayPage export broadcasts a valid request

Safe external use

Safe to listen to; use the server export rather than triggering this event directly

The receiving renderer still requires the page to exist in the display's saved pageOrder.

Display table

Persisted display fields include:

Internal network events

The resource also registers internal synchronization/request events such as:

These are implementation protocol, not a stable public API. Player requests are permission checked, proximity checked where applicable, validated, and rate limited. External resources should not trigger them.

See DUI Message Protocol for the browser boundary.

Last updated

Was this helpful?