Exports & Events
Welcome to the developers' reference guide for MDT Dispatch. The integration functions are split into separate client-side and server-side files for easy reference.
Table of Contents
💻 Client-Side Exports
All client exports are called as:
exports['kartik-mdt']:ExportName(...)- openMDT: Opens the main MDT tablet dashboard interface.
- openDispatch: Opens the dispatch interface (if permitted).
- openCivilianMdt: Opens the public civilian registry portal.
- disableAlerts: Disables or enables incoming dispatch alerts.
- CustomAlert: Triggers a custom dispatch alert.
⚙️ Server-Side Exports
All server exports are called as:
exports['kartik-mdt']:ExportName(...)- GetOfficerInfo: Returns the MDT officer profile for an online player.
- GetCitizen: Fetches a citizen's MDT profile (works online & offline).
- SearchCitizens: Performs a partial-match search across names and Citizen IDs.
- LookupPlate: Retrieves owner details, vehicle state, and flag data for a plate.
- GetWarrants: Returns active or historical warrant records.
- GetPenalCodes: Returns penal code categories and entries.
- HasActiveWarrant: Checks if a citizen has an active warrant.
- IsFakeProfile: Checks if a citizen ID belongs to a fake profile.
- GetFakeProfile: Retrieves details of a fake/undercover profile.
- CreateFakeProfile: Registers or updates a fake/undercover profile.
- DeleteFakeProfile: Deletes a fake/undercover profile.
- CreateCall: Generates a new dispatch / 911 call.
- ReplyToIncident: Appends an update message/reply to an active call.
- IsRegisteredDeptJob, Checks if a job name is a registered MDT department.
- InvalidateDeptCache, Rebuilds and invalidates the department job cache.
- CreateWeaponInfo: Registers a new weapon in the database.
🔔 Server Events
kartik-mdt:dispatchCreated
Fired server-side every time a new dispatch / 911 call is created, from the MDT UI, a client script, or exports['kartik-mdt']:CreateCall(...).
Event Registration
RegisterNetEvent('kartik-mdt:dispatchCreated', function(callData)
print(string.format("New dispatch call created: ID %d - %s", callData.id, callData.title))
end)Payload (callData Table Schema)
| Key | Type | Description |
|---|---|---|
id | number | Unique call ID (monotonically increasing) |
title | string | Short call title |
description | string | Full call detail |
coords | vector3 | World coordinates |
time | number | os.time() at creation |
isPanic | boolean | Whether this is a panic button call |
job | string or table | Target department(s) allowed to see the call |
street | string or nil | Street / location label |
type | string | "regular", "shooting", "robbery", "vehicle", or "medical" |
accentColor | string | Hex colour #rrggbb (auto-detected from keywords) |
plate | string or nil | Associated vehicle plate |
vehicle | string or nil | Vehicle model name |
person | string or nil | Caller / suspect name |
callerSource | number or nil | Server ID of the player who created the call |
status | string | Always "active" at creation |
respondingUnits | table | Empty {} at creation; grows as units respond |