Custom Alert
CustomAlert(data)
Sends a custom dispatch alert to specified jobs with optional details like location, person, vehicle, weapon, and blip.
📩 Parameters
data
data
Type: AlertData
Description: Contains all information required for dispatching an alert including coordinates, description, associated person/vehicle, and jobs to notify.
🧱 Data Structures
AlertData
AlertData
coords
vector3
❌
Coordinates of the alert. Defaults to the player's current location.
vehicle
number
/table
❌
Vehicle entity ID or a preloaded vehicle data table.
title
string
✅
Title of the alert.
code
string
✅
Alert code (e.g., "10-80").
description
string
✅
Full description of the alert.
sound
string
❌
Sound to play. Default: "dispatch"
(from the sounds/
folder).
type
string
❌
Alert type. Default: "Alert"
. Options: "Alert"
, "Call"
.
jobs
table
❌
Jobs to notify. Example: { police = true, ems = true }
.
PersonData
PersonData
name
string
Full name of the person.
phone
string
Phone number.
citizenid
string
Citizen identifier.
WeaponData
WeaponData
name
string
Name of the weapon.
BlipData
BlipData
radius
number
0
Radius of the blip area.
sprite
number
0
Sprite icon ID.
color
number
0
Blip color.
scale
number
1.0
Size scaling factor.
length
number
0
Duration (in minutes) the blip should remain on the map.
🔄 Server Event Triggered
TriggerServerEvent('kartik-mdt:server:sendDispatchNotification', dispatchData)
✅ Example Usage
exports['kartik-mdt']:CustomAlert({
title = "Shots Fired",
code = "10-71",
description = "Multiple gunshots heard in the area",
type = "Call",
sound = "gunshots",
coords = vector3(215.5, -810.3, 30.7),
person = {
name = "John Doe",
phone = "555-1234",
citizenid = "CIT12345"
},
weapon = {
name = "WEAPON_PISTOL"
},
blip = {
radius = 100.0,
sprite = 161,
color = 1,
scale = 1.2,
length = 5
},
jobs = {
police = true,
ems = true
}
})
Last updated