MDT Integration
Which fields ERS and Night Shifts MDT each own.
When the optional night_shifts_mdt resource is running, the MDT becomes the
single source of truth for identity and vehicle compliance data. ERS resolves
the MDT identity on the client, BEFORE asking the server for pedData /
vehicleData, then forwards the resolved identity inline so the server can
merge it synchronously. The OnFirstNPCInteraction /
OnFirstVehicleInteraction events fire once, in the same tick as the
underlying request, with MDT-authoritative values already overlaid into the
existing ERS field shape — external integrations that subscribe to these
events keep working without any code changes and never see an unmerged placeholder payload.
NPC payload (pedData)
Section titled “NPC payload (pedData)”| Field | With night_shifts_mdt | Without night_shifts_mdt |
|---|---|---|
FirstName, LastName, DOB, Gender |
MDT (persistent civilian record) | ERS (random rolls) |
Address, City, PostalCode, State, Country |
MDT | ERS |
Email, PhoneNumber, Nationality |
MDT | ERS |
ProfilePicture |
MDT (pictureUrl) |
ERS (model-derived) |
License_Car, License_Bike, License_Boat, License_Truck, License_Pilot (+ _Is_Valid / _Colour / _Icon per line, e.g. License_Car_Is_Valid) |
Same shape as plain ERS — same pedData keys. With MDT, each line is filled from the civilian’s PNC licence row for that fixed type id: License_Car → driver_license, License_Bike → motorcycle_license, License_Boat → boat_license, License_Truck → commercial_driver_license, License_Pilot → pilot_license. Those ids are not configurable (only the labels in admin). If there is no row for a type, the card still shows the slot, usually as no licence. Without MDT, ERS random rolls. |
ERS (random rolls) |
FlagsOrMarkers |
Use it like vanilla ERS. Keep reading pedData.FlagsOrMarkers on your existing server events (OnFirstNPCInteraction, pullover, etc.). With the MDT on, that object reflects the civilian’s Important Notices from the MDT instead of a random roll. You do not need a different field or a second integration path. |
ERS (random rolls) |
mdtCivilianId, mdtPersonalId |
Set on **mdt-merged** payloads — MDT civilian PK and dossier id for integrations |
(n/a — MDT not running) |
AddressType |
ERS (always — situational) | ERS |
Inventory, isDrunk, isDrugged, BehaviourState |
ERS (always — situational) | ERS |
MassiveBleeding, Airway, Breathing, Circulation, Hypothermia, CPR |
ERS (always — medical) | ERS |
Vehicle payload (vehicleData)
Section titled “Vehicle payload (vehicleData)”| Field | With night_shifts_mdt | Without night_shifts_mdt |
|---|---|---|
tax, mot, insurance, stolen, bolo, bolo_description |
MDT (persistent vehicle record) | ERS (random rolls) |
owner_name |
MDT (identity.owner.firstName + lastName — falls back to driver name) |
ERS (driver / random) |
build_year |
MDT if known (vehicle.buildYear), else ERS roll |
ERS (random roll) |
make, model, color, vehicle_class, license_plate, vehicle_picture_url |
ERS (vehicle attributes) | ERS |
inventory |
ERS (always — situational) | ERS |
When night_shifts_mdt is active, ERS waits up to ~12 seconds on the client for the MDT identity/vehicle lookup to merge before firing OnFirst* events with partial data.
Debug printing
Section titled “Debug printing”When Config.Debug = true, every OnFirst* event payload is pretty-printed
to the server console with a mode tag indicating how the data was
sourced:
| Mode | Meaning |
|---|---|
mdt-merged |
MDT identity resolved on the client and merged into the payload before firing. The common path when night_shifts_mdt is running. |
mdt-disabled |
night_shifts_mdt is not running. ERS data fired immediately (legacy behaviour). |
mdt-no-civilian |
Ped data was requested without an MDT-merged civilian id (non-standard integration path). |
mdt-no-vehicle |
Vehicle data was requested without MDT-backed vehicle identity. Now rare: the NPC pool fabricates a record for any ambient vehicle regardless of plate format, so this mostly indicates a non-standard integration path or a player vehicle with no registration. |
Use these tags when debugging server-side integrations to confirm which sourcing path fired for each OnFirst* event.