Browse docs

Emergency Dispatch

Public client events for reacting to Emergency Dispatch state and resolving caller incidents.

Emergency Dispatch Events

The following events are the supported client-facing lifecycle interface for the Dispatch App. State is server-authoritative; listeners should treat received payloads as read-only.

Events emitted to the client

EventPayloadDescription
sky_jobs_base:dispatch:stateChangedtableSignals that incident, unit, center, reporter, or audit state changed.
sky_jobs_base:dispatch:unitStatetable | falseProvides the local player's current dispatch unit, or false after release.
sky_jobs_base:dispatch:alarmtableNotifies an assigned unit about an incident and includes map target data.

State changes

Use stateChanged as a refresh signal. Its type can be incident, unit, unitReleased, center, reporters, or audit; additional fields depend on that type.

client.lua
AddEventHandler("sky_jobs_base:dispatch:stateChanged", function(change)
    print("Dispatch state changed:", change.type)
end)

Unit state

An active unit payload contains plate, callsign, job, type, statusCode, channel, frequency, crew, incidentId, and pendingIncidentId.

client.lua
AddEventHandler("sky_jobs_base:dispatch:unitState", function(unit)
    if unit then
        print("Current dispatch unit:", unit.callsign)
    else
        print("Released from dispatch unit")
    end
end)

Unit alarms

An alarm payload contains id, number, title, message, callsign, coords, mapTargetType, and mapTargetId.

client.lua
AddEventHandler("sky_jobs_base:dispatch:alarm", function(alarm)
    print(("%s: %s"):format(alarm.callsign, alarm.message))
end)

Event triggered by the client

sky_jobs_base:dispatch:resolveOwn

Removes all dispatches created by the calling player. Linked Dispatch App incidents are closed at the same time. A common use case is resolving a distress call after the player has been treated.

client.lua
TriggerServerEvent("sky_jobs_base:dispatch:resolveOwn")
Incident assignment and mutation events used by the built-in Dispatch App are internal APIs. Do not trigger them from integrations; use the documented exports and lifecycle events above.