🚨Police alerts

Adding other types of police alerts

Dispatch system examples

Location: Client/functions.lua

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

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

Last updated