🚨 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)

Field
Type
Required
Description

title

string

βœ… Yes

The title shown in the dispatch alert.

code

string

βœ… Yes

The alert code (e.g., 10-71, 10-50).

description

string

βœ… Yes

A short description of what’s happening.

location

string

βœ… Yes

Name of the street/location for the alert.

x, y, z

number

βœ… Yes

World coordinates for the alert.

sound

string

❌ No

File name of the sound from sounds/ folder. Default is "dispatch".

type

string

❌ No

Type of alert: "Alert" or "Call". Default is "Alert".

person

PersonData

❌ No

Details of the person involved.

weapon

WeaponData

❌ No

Details of the weapon involved.

vehicle

table/number

❌ No

Vehicle entity or data.

blip

BlipData

❌ No

Blip configuration for map.

jobs

table

❌ No

Jobs 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)

Last updated