Events
Integration events exposed by wasabi_mdt.
Prefer the documented exports when an equivalent export exists. Events listed as notifications should be listened to rather than triggered.
Client control events
wasabi_mdt:client:open
Opens the MDT. Optional arguments can deep-link to a page or CCTV camera.
TriggerEvent('wasabi_mdt:client:open', targetPage, cameraId)
| Parameter | Type | Required | Description |
|---|---|---|---|
targetPage | string | No | Page ID to open, such as dispatch or cameras. |
cameraId | number | No | Camera to open when deep-linking to the cameras page. |
The OpenMDT client export is preferred for third-party integrations.
wasabi_mdt:client:close
Closes the MDT and releases NUI focus.
TriggerEvent('wasabi_mdt:client:close')
The CloseMDT client export is preferred for third-party integrations.
Client notification events
These events are emitted by the resource and are safe to listen to.
wasabi_mdt:onOpen
Fired after the MDT opens.
AddEventHandler('wasabi_mdt:onOpen', function()
-- Pause or hide your integration while the MDT is open.
end)
wasabi_mdt:onClose
Fired when the MDT is fully closed through its normal close flow.
AddEventHandler('wasabi_mdt:onClose', function()
-- Restore your integration.
end)
wasabi_mdt:bodycamActiveChanged
Fired when the local BodyCam state changes.
AddEventHandler('wasabi_mdt:bodycamActiveChanged', function(active)
print(('BodyCam active: %s'):format(tostring(active)))
end)
| Parameter | Type | Description |
|---|---|---|
active | boolean | true while the BodyCam workflow is active. |
wasabi_mdt:client:newDispatch
Broadcast to configured department members and staff when a new dispatch is created.
AddEventHandler('wasabi_mdt:client:newDispatch', function(dispatch)
print(('New call: %s'):format(dispatch.title))
end)
Common dispatch fields include:
iddispatch_numbertypetitledescriptionlocationcoordsprioritycodesenderstatusresponderspinnedradiocreated_at
Listen to this event for display/integration work. Use the CreateDispatch export to create calls.
wasabi_mdt:client:dispatchUpdated
Broadcast to configured department members and staff when an active dispatch changes.
AddEventHandler('wasabi_mdt:client:dispatchUpdated', function(dispatch)
print(('Updated call: %s'):format(dispatch.dispatch_number))
end)
| Parameter | Type | Description |
|---|---|---|
dispatch | table | Complete updated dispatch record. |
wasabi_mdt:client:dispatchRemoved
Broadcast when an active dispatch is removed or expires.
AddEventHandler('wasabi_mdt:client:dispatchRemoved', function(id)
print(('Removed dispatch ID: %s'):format(id))
end)
| Parameter | Type | Description |
|---|---|---|
id | number | Internal ID of the removed dispatch. |
Charge integration hooks
These hooks are fired when an officer links or unlinks a charge and an incident. They are intended for billing, jail, audit, or custom workflow integrations.
The server event is always fired. A matching client event is also sent to the incident's primary citizen when that citizen is online.
wasabi_mdt:onChargeLinked
AddEventHandler('wasabi_mdt:onChargeLinked', function(
chargeData,
primaryIdentifier,
incidentData,
officerData,
adjustments
)
local fine = adjustments and adjustments.adjusted_fine or chargeData.fine
local jailTime = adjustments and adjustments.adjusted_jail or chargeData.jail_time
-- Create your invoice or jail action here.
end)
| Parameter | Type | Description |
|---|---|---|
chargeData | table | Charge record including title, description, fine, jail time, and category. |
primaryIdentifier | string or nil | Identifier of the incident's primary citizen. |
incidentData | table | Incident summary and optional primary citizen data. |
officerData | table | Linking officer identifier, name, and department/job. |
adjustments | table or nil | Adjusted fine/jail and reduction metadata stored on the link. |
A matching client listener uses the same parameters:
RegisterNetEvent('wasabi_mdt:onChargeLinked', function(chargeData, primaryIdentifier, incidentData, officerData, adjustments)
-- Runs for the online primary citizen.
end)
wasabi_mdt:onChargeUnlinked
AddEventHandler('wasabi_mdt:onChargeUnlinked', function(
chargeData,
primaryIdentifier,
incidentData,
officerData
)
-- Refund, reverse, or log the removed charge here.
end)
| Parameter | Type | Description |
|---|---|---|
chargeData | table | Charge that was removed from the incident. |
primaryIdentifier | string or nil | Identifier of the incident's primary citizen. |
incidentData | table | Incident summary and optional primary citizen data. |
officerData | table | Officer who removed the link. |
Migration from older integrations
The old wasabi_mdt:createExternalDispatch event is not part of the current public API. Replace it with a CreateDispatch export:
-- Client-side
exports.wasabi_mdt:CreateDispatch(data)
-- Server-side
exports.wasabi_mdt:CreateDispatch(data)
Other wasabi_mdt:server:*, framework bridge, patrol, camera synchronization, and NUI callback events are internal implementation details. Do not trigger them from third-party resources; their validation and payloads may change.