Skip to content

Commit

Permalink
Merge pull request #147 from NewtyMan/fix/banking-interaction-zone
Browse files Browse the repository at this point in the history
πŸ› Fix banking interaction zone
  • Loading branch information
GhzGarage authored Nov 19, 2024
2 parents fd6879f + 7f7aebc commit 9e2991a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
local QBCore = exports['qb-core']:GetCoreObject()
local zones = {}

local isPlayerInsideBankZone = false

-- Functions

local function OpenBank()
Expand Down Expand Up @@ -200,14 +202,14 @@ if not Config.useTarget then
})

combo:onPlayerInOut(function(isPointInside)
if isPointInside then
isPlayerInsideBankZone = isPointInside
if isPlayerInsideBankZone then
exports['qb-core']:DrawText('Open Bank')
CreateThread(function()
while isPointInside do
while isPlayerInsideBankZone do
Wait(0)
if IsControlJustPressed(0, 38) then
OpenBank()
break
end
end
end)
Expand Down

0 comments on commit 9e2991a

Please sign in to comment.