Server Side

lCreate Alert

Use following export to create dispatch alert

---@class DispatchAlert
---@field priority 'high' | 'medium' | 'low'
---@field code string
---@field title string
---@field description string
---@field street? string
---@field coords vec3
---@field fields? { icon: string, label: string, value?: string }[]
---@field alertTime number # duration of alert in seconds
---@field image? string # optional image url
---@field jobs? string | table
---@field sound? string # sound name from web/assets/sounds
---@field blip? { sprite?: number, color?: number, scale?: number, shortRange?: boolean, name?: string }
 
exports['p_mdt']:CreateAlert(DispatchAlert)
circle-info

Example of Usage [You can paste that in your code and modify]

exports['p_mdt']:CreateAlert({
    priority = 'high',
    code = '10-90',
    title = 'Test Title',
    description = 'Test Description',
    coords = vec3(0.0, 0.0, 0.0),
    fields = {
        {icon = 'fa-solid fa-user', label = 'Officer', value = 'John Doe'}
    },
    alertTime = 120,
    sound = 'shots_fired',
    blip = {
        sprite = 1,
        color = 1,
        scale = 0.9,
        shortRange = true,
        name = 'Robbery'
    }
})

GetConfig

Use following export to get config


GetPlayerData

Use following export to get player data from MDT by identifier


hasLicense

Use following export to check if officer has some license


getLicences

Use following export to get all officer licences

Last updated