🔄Exports

Client Exports

OpenMDT(initialPage?) -> boolean

Opens MDT on the local client.

local didOpen = exports['m-Mdt']:OpenMDT('dispatch')
if not didOpen then
    print('OpenMDT failed')
end

CloseMDT() -> boolean

Closes MDT on the local client.

local didClose = exports['m-Mdt']:CloseMDT()
if not didClose then
    print('CloseMDT failed')
end

ToggleMDT(initialPage?) -> boolean

Toggles MDT open/close state.


IsOpen() -> boolean

Returns whether MDT is currently open.


OpenDispatchHUD() -> boolean

Opens the Dispatch HUD.


CloseDispatchHUD() -> boolean

Closes the Dispatch HUD.


ToggleDispatchHUD() -> boolean

Toggles the Dispatch HUD.


IsDispatchHUDOpen() -> boolean

Returns whether the Dispatch HUD is currently open.


ToggleBodycam() -> boolean

Toggles local bodycam state.


Server Exports

Police / Officers

IsPolice(source) -> boolean, number

Returns whether source is a police officer and their grade.

GetOfficerBySource(source) -> table|nil

Fetches officer data from mdt_officers by source.

GetOfficerByIdentifier(identifier) -> table|nil

Fetches officer data by identifier.


Dispatch

CreateDispatchCall(data) -> table

Creates a dispatch call and notifies online police officers.

Example (native format):

GetDispatchCall(callNumber) -> table|nil

Fetches a call by call_number.

GetActiveDispatchCalls() -> table[]

Lists active calls (pending, in-progress).


Notifications

NotifyPolice(payload) -> boolean

Sends a notification to all online police officers.


Weapons

GetWeapons(limit?) -> table[]

Lists weapons (limit default 100, min 1, max 500).

GetWeaponBySerial(serialNumber) -> table|nil

Fetches a weapon by serial.

RegisterWeapon(data) -> table

Registers a new weapon.


Vehicles

GetVehicles(limit?) -> table[]

Lists vehicles.

GetVehicleByPlate(plate) -> table|nil

Fetches a vehicle by plate.

UpdateVehicleStatus(plate, status) -> table

Updates a vehicle status.


BOLO

GetBOLOs(limit?, onlyActive?) -> table[]

Lists BOLO entries.

GetBOLOById(id) -> table|nil

Fetches BOLO by ID.

CreateBOLO(data) -> table

Creates a BOLO.


Warrants

GetWarrants(limit?, onlyActive?) -> table[]

Lists warrants.

GetWarrantById(id) -> table|nil

Fetches a warrant by ID.

CreateWarrant(data) -> table

Creates a warrant.


Incidents

GetIncidents(limit?) -> table[]

Lists incidents.

GetIncidentById(id) -> table|nil

Fetches an incident by ID.

CreateIncident(data) -> table

Creates an incident.

Last updated