Kartik Scripts

Dispatch Alert

πŸ“˜ MDT Alert System – Server Side Trigger

πŸ”” Event: kartik-mdt:server:sendDispatchNotification

βœ… Usage Example (Server Side)

local dispatchData = {
    title = "Shots Fired",
    code = "10-71",
    description = "Multiple shots fired near Legion Square",
    location = "Legion Square",
    sound = "dispatch", 
    x = 215.76,
    y = -810.12,
    z = 30.73,
    type = "Alert", -- or "Call"
    person = {
        name = "John Doe",
        phone = "123-456-7890",
        citizenid = "CIT12345"
    },
    weapon = {
        name = "WEAPON_PISTOL"
    },
    blip = {
        radius = 75.0,
        sprite = 161,
        color = 1,
        scale = 1.2,
        length = 5 -- in minutes
    },
    jobs = {
        police = true,
        ems = true
    }
}

TriggerEvent('kartik-mdt:server:sendDispatchNotification', dispatchData)

πŸ“¦ Payload Structure

AlertData (Table)

FieldTypeRequiredDescription
titlestringβœ… YesThe title shown in the dispatch alert.
codestringβœ… YesThe alert code (e.g., 10-71, 10-50).
descriptionstringβœ… YesA short description of what’s happening.
locationstringβœ… YesName of the street/location for the alert.
x, y, znumberβœ… YesWorld coordinates for the alert.
soundstring❌ NoFile name of the sound from sounds/ folder. Default is "dispatch".
typestring❌ NoType of alert: "Alert" or "Call". Default is "Alert".
personPersonData❌ NoDetails of the person involved.
weaponWeaponData❌ NoDetails of the weapon involved.
vehicletable/number❌ NoVehicle entity or data.
blipBlipData❌ NoBlip configuration for map.
jobstable❌ NoJobs to notify. Example: { police = true, ems = true }

🧠 Tips

  • Use this from server-side scripts where an alert should be triggered due to an event (e.g., shooting, car theft, panic button).
  • The vehicle field can be a numeric vehicle entity ID or a custom table with preformatted data.
  • Use blip.length to auto-remove the blip after a set number of minutes.

You can also use the client-side export:

exports['kartik-mdt']:CustomAlert(alertData)

But for server-side, always use:

TriggerEvent('kartik-mdt:server:sendDispatchNotification', alertData)

On this page