From 8a6facf0e6bb2aaf6cbaf4e72bd19a06b6cbcd04 Mon Sep 17 00:00:00 2001 From: jonyadam <93274097+jonyadam@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:03:07 +0200 Subject: [PATCH] Fixed player not being able to exit when disconnecting and rejoining the server --- client/main.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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()