🚨Police alerts

Adding other types of police alerts

Dispatch system examples

Location: Client/functions.lua


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

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

Last updated