🚨Police alerts
Dispatch system examples
Location: Client/functions_open.lua
------- / Robbery notification
RegisterNetEvent('estrp-casinoheist:robberyinprogress')
AddEventHandler('estrp-casinoheist:robberyinprogress',function(playerCoords,currentStreetName)
local PlayerData = QBCore.Functions.GetPlayerData()
if PlayerData.job.name == "police" then
Notifi({ title = Config.title, text = Text('casinorobbery').. " " .. currentStreetName, duration = 10000, icon = 'fa-solid fa-laptop-code', color = '#ff0000' })
RemoveBlip(blipcasinorob)
blipcasinorob = AddBlipForCoord(playerCoords)
SetBlipSprite(blipcasinorob , 161)
SetBlipScale(blipcasinorob , 2.0)
SetBlipColour(blipcasinorob, 3)
PulseBlip(blipcasinorob)
Wait(100000)
RemoveBlip(blipcasinorob)
end
end)
function Policenotify()
local playerCoords = GetEntityCoords(PlayerPedId(-1))
local currentStreetName = GetCurrentStreetName()
TriggerServerEvent('estrp-casinoheist:robberyinprogress', playerCoords,currentStreetName)
end
Last updated