🚨Police alerts

Adding other types of police alerts

Dispatch system examples

Location: Client/functions.lua

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

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

Last updated