Docs/Yecoyz MDT

Exports

Server and client exports and events of Yecoyz MDT.

Server exports

lua
exports.yecoyz_mdt:IsWanted(identifier)                    -- boolean
exports.yecoyz_mdt:IsVehicleWanted(plate)                  -- wanted, stolen
exports.yecoyz_mdt:GetWarrants('person' | 'vehicle', ref)  -- active warrants
exports.yecoyz_mdt:GetFlags(identifier)                    -- { 'armed', ... }
exports.yecoyz_mdt:GetVehicleFlags(plate)                  -- { 'stolen', ... }
exports.yecoyz_mdt:AddTimelineEntry('person' | 'vehicle' | 'case', id, 'police', 'Speed check: 142 km/h', 'Radar')
exports.yecoyz_mdt:GetDepartment(source)                   -- 'police' | 'ems' | nil
exports.yecoyz_mdt:MarkFinePaid(fineId)                    -- for billing scripts
exports.yecoyz_mdt:GetWeapon(serial)                       -- { serial, item, label, owner, status } or nil
exports.yecoyz_mdt:IsWeaponStolen(serial)                  -- boolean

Creating a call

A call straight to the units, for alarms, store robberies or phone apps. Returns the call id.

lua
local callId = exports.yecoyz_mdt:CreateCall({
    kind = 'robbery',                 -- a Config.Dispatch.Calls key
    coords = vector3(25.7, -1347.3, 29.5),
    street = 'Innocence Blvd',        -- optional
    description = 'Silent alarm at the 24/7',
    -- optional: title, priority (1-4), departments = { 'police' }, caller, phone, radius
})

exports.yecoyz_mdt:CloseCall(callId)

Server scripts can also use TriggerEvent('yecoyz_mdt:server:createCall', data) with the same data.

Client exports

lua
exports.yecoyz_mdt:Open()
exports.yecoyz_mdt:Close()
exports.yecoyz_mdt:IsOpen()

-- A crime by the local player, reported only if a ped saw it (or heard it, for shooting).
exports.yecoyz_mdt:ReportCrime('vehicle_theft', { vehicle = vehicle })  -- true when a witness is calling

Shooting, fights, killings, carjackings and being down are detected by the MDT itself. Use ReportCrime from lockpicking, hotwiring, store robbery or drug-sale scripts.

Server events

Event Data
yecoyz_mdt:server:caseCreated { id, department, title, createdBy }
yecoyz_mdt:server:fineIssued { id, identifier, amount, charges, department, officer }
yecoyz_mdt:server:arrestRegistered { id, identifier, jail, fine, charges, department, officer }
yecoyz_mdt:server:warrantIssued { id, kind, ref, status, danger, department }
yecoyz_mdt:server:warrantClosed { id, kind, ref, status }
yecoyz_mdt:server:vehicleFlagsChanged plate, flags
yecoyz_mdt:server:callCreated The call: { id, kind, code, title, departments, x, y, z, street, origin, ... }
yecoyz_mdt:server:seizureCreated { id, identifier, items, caseId, department }
Stuck on this step?

Open a ticket in the Discord with what you tried and what you see, and I'll help you get it running.

Ask on Discord
Up nextOverviewWhat Yecoyz Radar does and what's included.