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
  • Loading branch information
jonyadam authored Feb 1, 2024
1 parent 8a6facf commit ea031c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,9 @@ CreateThread(function()
local pos = GetEntityCoords(PlayerPedId(), true)

if #(pos - vector3(Config.OutsideLocation.x, Config.OutsideLocation.y, Config.OutsideLocation.z)) < 1.3 then
isInsideEntranceZone = true
end
if isInsideEntranceZone == true then
sleep = 0
if IsControlJustReleased(0, 38) then
exports['qb-core']:KeyPressed()
Expand All @@ -556,6 +559,9 @@ CreateThread(function()
end

if #(pos - vector3(Config.InsideLocation.x, Config.InsideLocation.y, Config.InsideLocation.z)) < 1.3 then
isInsideExitZone = true
end
if isInsideExitZone == true then
sleep = 0
if IsControlJustReleased(0, 38) then
exports['qb-core']:KeyPressed()
Expand All @@ -566,6 +572,9 @@ CreateThread(function()
end

if #(pos - vector3(Config.DutyLocation.x, Config.DutyLocation.y, Config.DutyLocation.z)) < 1.3 then
isInsideDutyZone = true
end
if isInsideDutyZone == true then
sleep = 0
if IsControlJustReleased(0, 38) then
exports['qb-core']:KeyPressed()
Expand Down

0 comments on commit ea031c1

Please sign in to comment.