🚨Police alerts

Adding other types of police alerts

Dispatch system examples

Location: Client/functions_open.lua

------- / Robbery notification
RegisterNetEvent('estrp-bobcat:robberyinprogress')
AddEventHandler('estrp-bobcat:robberyinprogress',function(playerCoords,currentStreetName)
    if PlayerJob.name == "police" then
        Notifi({ title = Config.title, text = Text('bobcatrobbery').. " " .. currentStreetName, duration = 10000, icon = 'fa-solid fa-laptop-code', color = '#ff0000' })
        RemoveBlip(blipbobcat)
        blipbobcat = AddBlipForCoord(playerCoords)
        SetBlipSprite(blipbobcat , 161)
        SetBlipScale(blipbobcat , 2.0)
        SetBlipColour(blipbobcat, 3)
        PulseBlip(blipbobcat)
        Wait(100000)
        RemoveBlip(blipbobcat)
        end
    end)

function Policenotify()
        local playerCoords = GetEntityCoords(PlayerPedId(-1))
        local currentStreetName = GetCurrentStreetName()
        TriggerServerEvent('estrp-bobcat:robberyinprogress', playerCoords,currentStreetName)
end

Last updated