Kartik Scripts

Imperial CAD

ERS works with Imperial CAD through its FiveM resource (ImperialCAD). It runs next to your dispatch and MDT: Kartik MDT, ps-dispatch or cd_dispatch keep getting everything as before, and Imperial CAD gets a copy.

What is sent

ERS eventIn Imperial CAD
Callout startsA new 911 call with the code, title, description and street
Traffic stop starts (when Config.Traffic.dispatchCall is on)A new 911 call
Pursuit starts (when the pursuit dispatchCall is on)A new 911 call with the plate
Officer takes the calloutThe officer is attached to the call
Officer arrives on sceneA note on the call
Callout, stop or pursuit endsThe call is closed
NPC vehicle is checkedThe vehicle is added (plate, model, colour, year, registration, insurance, stolen flag, owner) so plates can be run in the CAD
New NPC is identified (optional)A CAD character with name, date of birth, gender, address, phone and licence status

A plate that is already in the CAD is never added twice.

Attaching officers, notes and closing calls use the officer's Discord ID. Officers need Discord linked to FiveM and to their Imperial CAD account.

Imperial CAD has no exports for citations, arrests, reports or unit status, so those stay in ERS and your MDT.

Setup

  1. Install and set up the ImperialCAD resource as described in the Imperial CAD docs, including imperial_community_id and imperialAPI in server.cfg.
  2. Start ImperialCAD before kartik-ers in server.cfg.
  3. Keep Config.Records.pushToMDT = true for vehicles and characters to be sent.
  4. Restart the server. ERS detects Imperial CAD on its own.

Config

shared/config.lua

Config.ImperialCAD = {
    enabled          = true,
    calls            = true,  -- callouts, traffic stops and pursuits become CAD calls (follows the dispatchCall options)
    closeCalls       = true,  -- close the CAD call when the callout / stop / pursuit ends
    vehicles         = true,  -- NPC vehicles are added to the CAD so plates can be run
    civilians        = false, -- NPCs are added as CAD characters (needs recordsDiscordId)
    recordsDiscordId = '',    -- Discord ID of the CAD account that owns NPC characters
    callerName       = 'ERS Dispatch',
    city             = 'Los Santos',
    county           = 'Los Santos County',
    postal           = '000',
    regState         = 'San Andreas',
}
OptionDefault
enabledtrueTurn the whole integration on or off
callstrueSend callouts, traffic stops and pursuits as 911 calls. Each one still follows its own dispatchCall / createDispatchCall option
closeCallstrueClose the CAD call when the scene ends (follows Config.Callouts.clearCallOnEnd for callouts)
vehiclestrueAdd NPC vehicles to the CAD
civiliansfalseAdd NPCs as CAD characters. Needs recordsDiscordId
recordsDiscordId''Discord ID of the Imperial CAD account that will own NPC characters. A separate "records" account keeps them out of your players' own civilian lists
callerName'ERS Dispatch'Caller name on calls without a named caller
city, county, postalLos SantosFilled into calls and records. postal is the same fixed value on every call
regState'San Andreas'Registration state on NPC vehicles

With civilians on, the NPC's vehicles are linked to their CAD character, so running the plate shows the owner's record.

Troubleshooting

  • Set Config.Debug = true in ERS to see any Imperial CAD request that failed in the server console.
  • No calls appear: check that ImperialCAD starts before kartik-ers and that its API key and community ID are set.
  • Officer not attached to calls: their Discord is not linked to FiveM or to Imperial CAD.

On this page