🚨Police alerts

Adding other types of police alerts

Dispatch system examples

Location: Client/functions_targets_open

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

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

Last updated