diff --git a/client/main.lua b/client/main.lua index e3f9cf79..aeb0e162 100644 --- a/client/main.lua +++ b/client/main.lua @@ -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) \ No newline at end of file +end)