🚨Police alerts
Dispatch system examples
Location: Client/functions_open.lua
------- / Robbery notification
RegisterNetEvent('estrp-jewels:robberyinprogress')
AddEventHandler('estrp-jewels: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(blipjewels)
blipjewels = AddBlipForCoord(playerCoords)
SetBlipSprite(blipjewels , 161)
SetBlipScale(blipjewels , 2.0)
SetBlipColour(blipjewels, 3)
PulseBlip(blipjewels)
Wait(100000)
RemoveBlip(blipjewels)
end
end)
function Policenotify()
local playerCoords = GetEntityCoords(PlayerPedId(-1))
local currentStreetName = GetCurrentStreetName()
TriggerServerEvent('estrp-jewels:robberyinprogress', playerCoords,currentStreetName)
end
Last updated