mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 10:18:54 +00:00
Merge pull request #148 from SMVampire/master
Fix Last Commit Circa 2019
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)
|
||||
|
||||
+2
-2
@@ -77,7 +77,7 @@ Citizen.CreateThread(function()
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_jobs:startWork')
|
||||
AddEventHandler('esx_jobs:startWork', function(zoneIndex)
|
||||
AddEventHandler('esx_jobs:startWork', function(zoneIndex, zoneKey)
|
||||
if not playersWorking[source] then
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
@@ -85,7 +85,7 @@ AddEventHandler('esx_jobs:startWork', function(zoneIndex)
|
||||
local jobObject = Config.Jobs[xPlayer.job.name]
|
||||
|
||||
if jobObject then
|
||||
local jobZone = jobObject.Zones[zoneIndex]
|
||||
local jobZone = jobObject.Zones[zoneKey]
|
||||
|
||||
if jobZone and jobZone.Item then
|
||||
playersWorking[source] = {
|
||||
|
||||
Reference in New Issue
Block a user