diff --git a/client/main.lua b/client/main.lua index 151876d..664f06d 100644 --- a/client/main.lua +++ b/client/main.lua @@ -543,8 +543,9 @@ CreateThread(function() else while true do sleep = 500 + local pos = GetEntityCoords(PlayerPedId(), true) - if isInsideEntranceZone then + if #(pos - vector3(Config.OutsideLocation.x, Config.OutsideLocation.y, Config.OutsideLocation.z)) < 1.3 then sleep = 0 if IsControlJustReleased(0, 38) then exports['qb-core']:KeyPressed() @@ -554,7 +555,7 @@ CreateThread(function() end end - if isInsideExitZone then + if #(pos - vector3(Config.InsideLocation.x, Config.InsideLocation.y, Config.InsideLocation.z)) < 1.3 then sleep = 0 if IsControlJustReleased(0, 38) then exports['qb-core']:KeyPressed() @@ -564,7 +565,7 @@ CreateThread(function() end end - if isInsideDutyZone then + if #(pos - vector3(Config.DutyLocation.x, Config.DutyLocation.y, Config.DutyLocation.z)) < 1.3 then sleep = 0 if IsControlJustReleased(0, 38) then exports['qb-core']:KeyPressed()