Browse docs
Emergency Dispatch
Emergency Dispatch Events
These events form the supported client-facing integration surface for Dispatch Enhanced v2. State is server-authoritative; treat every received payload as read-only.
Events emitted to the client
| Event | Payload | Description |
|---|---|---|
sky_jobs_base:dispatch:stateChanged | table | Refresh signal for authorized incident, unit, shift, call, reporter, broadcast, SDS, audit, or bootstrap changes. |
sky_jobs_base:dispatch:unitState | table | false | Current unit for the local player, or false after release. |
sky_jobs_base:dispatch:alarm | table | Alarm delivery for a selected unit and incident. |
sky_jobs_base:dispatch:publicBroadcast | table | Public warning, clear, traffic, information, or announcement message for an on-duty target job. |
sky_jobs_base:dispatch:sds | table | Short Data Service message sent to the local player's staffed unit. |
sky_jobs_base:dispatch:callbackRequested | table | Local event emitted after a dispatcher successfully starts a callback. |
State changes
Use stateChanged as a refresh hint rather than a complete state object. Common type values are
bootstrap, shift, incident, unit, unitReleased, call, reporters, broadcast, sds,
and audit. Depending on the type, the payload also carries fields such as id, plate,
centerId, or data.
AddEventHandler("sky_jobs_base:dispatch:stateChanged", function(change)
print("Dispatch state changed:", change.type)
end)
The server only emits incident refreshes to staffed units that may see the incident or are assigned to it, and to authorized dispatchers in the relevant center.
Unit state
An active payload includes plate, callsign, job, type, typeLabel, typeIcon,
statusCode, channel, frequency, crew, crewCount, crewCapacity, stationId,
joinLocked, resourceType, incidentId, and pendingIncidentId.
AddEventHandler("sky_jobs_base:dispatch:unitState", function(unit)
if unit then
print(("Current unit: %s (%d crew)"):format(unit.callsign, unit.crewCount))
else
print("Released from dispatch unit")
end
end)
Unit alarms
An alarm payload includes incidentType, id, number, title, message, callsign, coords,
mapTargetType, mapTargetId, and silent. Delivery acknowledgement data is reserved for Jobs
Base itself.
AddEventHandler("sky_jobs_base:dispatch:alarm", function(alarm)
print(("%s: %s"):format(alarm.callsign, alarm.message))
end)
Public broadcasts
The broadcast payload contains id, centerId, incidentId, type, message, jobs,
provider, author, and createdAt.
AddEventHandler("sky_jobs_base:dispatch:publicBroadcast", function(broadcast)
print(("Dispatch broadcast [%s]: %s"):format(broadcast.type, broadcast.message))
end)
SDS messages
The SDS payload contains id, centerId, incidentId, unitId, message, author, and
createdAt.
AddEventHandler("sky_jobs_base:dispatch:sds", function(message)
print(("SDS for %s: %s"):format(message.unitId, message.message))
end)
Callback handoff
After a dispatcher successfully requests a callback, Jobs Base emits the local
callbackRequested event even when no phone-provider handoff is configured. Its payload contains
call, phoneNumber, phoneProvider, and centerId.
AddEventHandler("sky_jobs_base:dispatch:callbackRequested", function(callback)
exports["my_phone"]:StartCall(callback.phoneNumber)
end)
Config.Dispatch.phone.callbackHandoff can additionally forward the same request to a configured
custom client event or client export.
Event triggered by the client
sky_jobs_base:dispatch:resolveOwn
Removes all legacy dispatches created by the calling player. Linked Dispatch App incidents receive the same closure request. This is useful when the player's own distress incident has ended.
TriggerServerEvent("sky_jobs_base:dispatch:resolveOwn")