ed
This commit is contained in:
parent
00910d1237
commit
0f392143e5
11 changed files with 329 additions and 14 deletions
|
@ -523,10 +523,20 @@ RegisterNetEvent('vending:server:startRobbery', function(coords)
|
|||
-- Alert police - use a generic location name instead of street name
|
||||
local locationName = "Verkaufsautomat #" .. machineId
|
||||
|
||||
-- Get player position for more accurate location
|
||||
local playerPos = GetEntityCoords(GetPlayerPed(src))
|
||||
|
||||
-- Alert police with enhanced data
|
||||
local alertData = {
|
||||
coords = coords,
|
||||
locationName = locationName,
|
||||
machineId = machineId
|
||||
}
|
||||
|
||||
local players = QBCore.Functions.GetQBPlayers()
|
||||
for k, v in pairs(players) do
|
||||
if v.PlayerData.job.name == 'police' and v.PlayerData.job.onduty then
|
||||
TriggerClientEvent('vending:client:policeAlert', v.PlayerData.source, coords, locationName)
|
||||
TriggerClientEvent('vending:client:policeAlert', v.PlayerData.source, alertData)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -550,6 +560,7 @@ RegisterNetEvent('vending:server:startRobbery', function(coords)
|
|||
TriggerClientEvent('vending:client:startRobbery', src, coords)
|
||||
end)
|
||||
|
||||
|
||||
-- Complete robbery
|
||||
RegisterNetEvent('vending:server:completeRobbery', function(coords, success)
|
||||
local src = source
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue