Server Events

These are server-side events emitted by zephyr_mdt. Other server resources can listen to them with AddEventHandler.


zephyr_mdt:server:bolosUpdated

Fired whenever a BOLO is created or cancelled. zephyr_dispatch listens to this event to keep its own BOLO list in sync.

AddEventHandler('zephyr_mdt:server:bolosUpdated', function(bolos)
    -- bolos is a table containing the affected BOLO object(s)
end)
ParameterTypeDescription
bolostableArray of affected BOLO objects (one item for create/cancel).

BOLO object fields

FieldTypeDescription
idstringBOLO ID (e.g. BOLO-0001).
prioritynumberPriority level (1 = high, 2 = medium, 3 = low).
statusstring'Active' or 'Cancelled'.
subjectTypestring'Person' or 'Vehicle'.
subjectIdstringCID for persons, plate for vehicles.
descriptionstringBOLO description text.
lastSeenstringLast known location or description.
officerstringDisplay name of the officer who created the BOLO.
datestringCreation date (YYYY-MM-DD).

Example

AddEventHandler('zephyr_mdt:server:bolosUpdated', function(bolos)
    for _, bolo in ipairs(bolos) do
        if bolo.status == 'Active' then
            print(('New BOLO: %s — %s'):format(bolo.id, bolo.description))
        end
    end
end)