mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 02:38:53 +00:00
Pass currentZone to serverside
This commit is contained in:
+4
-4
@@ -84,7 +84,7 @@ function OpenMenu()
|
||||
end)
|
||||
end
|
||||
|
||||
AddEventHandler('esx_jobs:action', function(job, zone)
|
||||
AddEventHandler('esx_jobs:action', function(job, zone, zoneKey)
|
||||
menuIsShowed = true
|
||||
if zone.Type == "cloakroom" then
|
||||
OpenMenu()
|
||||
@@ -96,7 +96,7 @@ AddEventHandler('esx_jobs:action', function(job, zone)
|
||||
if IsPedInAnyVehicle(playerPed, false) then
|
||||
ESX.ShowNotification(_U('foot_work'))
|
||||
else
|
||||
TriggerServerEvent('esx_jobs:startWork', zone.Item)
|
||||
TriggerServerEvent('esx_jobs:startWork', zone.Item, zoneKey)
|
||||
end
|
||||
elseif zone.Type == "vehspawner" then
|
||||
local spawnPoint = nil
|
||||
@@ -469,7 +469,7 @@ Citizen.CreateThread(function()
|
||||
|
||||
if IsControlJustReleased(0, Keys['E']) and not menuIsShowed and isInMarker then
|
||||
if onDuty or zone.Type == "cloakroom" or PlayerData.job.name == "reporter" then
|
||||
TriggerEvent('esx_jobs:action', job, zone)
|
||||
TriggerEvent('esx_jobs:action', job, zone, currentZone)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -539,4 +539,4 @@ Citizen.CreateThread(function()
|
||||
-- Tailor
|
||||
RequestIpl("id2_14_during_door")
|
||||
RequestIpl("id2_14_during1")
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user