🚨Police alerts

Adding other types of police alerts

Dispatch system examples

Location: Client/functions_open.lua

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

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

Last updated