Kartik Scripts

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(...)

⚙️ 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)

KeyTypeDescription
idnumberUnique call ID (monotonically increasing)
titlestringShort call title
descriptionstringFull call detail
coordsvector3World coordinates
timenumberos.time() at creation
isPanicbooleanWhether this is a panic button call
jobstring or tableTarget department(s) allowed to see the call
streetstring or nilStreet / location label
typestring"regular", "shooting", "robbery", "vehicle", or "medical"
accentColorstringHex colour #rrggbb (auto-detected from keywords)
platestring or nilAssociated vehicle plate
vehiclestring or nilVehicle model name
personstring or nilCaller / suspect name
callerSourcenumber or nilServer ID of the player who created the call
statusstringAlways "active" at creation
respondingUnitstableEmpty {} at creation; grows as units respond

On this page