Dispatch

Add this alert into your dispatch call config e.g. ps-dispatch/config.lua

['poaching'] = {
        radius = 0,
        sprite = 141,
        color = 1,
        scale = 1.5,
        length = 2,
        sound = 'Lose_1st',
        sound2 = 'GTAO_FM_Events_Soundset',
        offset = true,
        flash = false
},

And add this into your dispatch call alerts file e.g. ps-dispatch/alerts.lua

local function Poaching()
    local coords = GetEntityCoords(cache.ped)

    local dispatchData = {
        message = locale('poaching'),
        codeName = 'poaching',
        code = '10-13',
        icon = 'fas fa-gun',
        priority = 1,
        --weapon = GetWeaponName(),
        coords = coords,
        gender = GetPlayerGender(),
        street = GetStreetAndZone(coords),
        alertTime = 10,
        jobs = { 'leo' }
    }

    TriggerServerEvent('ps-dispatch:server:notify', dispatchData)
end
exports('Poaching', Poaching)

Last updated