Skip to content

Commit

Permalink
Fixed player not being able to exit when disconnecting and rejoining …
Browse files Browse the repository at this point in the history
…the server
  • Loading branch information
jonyadam authored Feb 1, 2024
1 parent 396071a commit 8a6facf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 8a6facf

Please sign in to comment.