From dd634b66cc27e3a80437f6a2681609c7dcd47cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=20Gerg=C5=91?= <69343477+Rav3n95@users.noreply.github.com> Date: Sun, 8 Jan 2023 18:30:58 +0100 Subject: [PATCH 1/2] Fixes --- [esx_addons]/esx_banking/client/main.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/[esx_addons]/esx_banking/client/main.lua b/[esx_addons]/esx_banking/client/main.lua index bcaeb811..f250d735 100644 --- a/[esx_addons]/esx_banking/client/main.lua +++ b/[esx_addons]/esx_banking/client/main.lua @@ -105,11 +105,12 @@ local function StartThread() CreateBlips() while PlayerLoaded do + print('isInMarker', isInMarker, 'isInAtmMarker', isInAtmMarker) _PlayerPedId = PlayerPedId() _GetEntityCoords = GetEntityCoords(_PlayerPedId) + local closestBank = {} if IsPedOnFoot(PlayerPedId()) then - local closestBank = {} for i = 1, #Config.AtmModels do local atm = GetClosestObjectOfType(_GetEntityCoords, 8.0, Config.AtmModels[i], false) @@ -151,6 +152,9 @@ local function StartThread() isInMarker = false ESX.HideUI() end + elseif not next(closestBank) and isInMarker then + isInMarker = false + ESX.HideUI() end end @@ -247,6 +251,7 @@ end) AddEventHandler('onResourceStop', function(resource) if resource ~= GetCurrentResourceName() then return end RemoveBlips() + ESX.HideUI() if isInMenu then CloseUi() end From 23705a135f028ba111e7723921b5a45feecd9710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=20Gerg=C5=91?= <69343477+Rav3n95@users.noreply.github.com> Date: Sun, 8 Jan 2023 18:31:48 +0100 Subject: [PATCH 2/2] Forgotten print --- [esx_addons]/esx_banking/client/main.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/[esx_addons]/esx_banking/client/main.lua b/[esx_addons]/esx_banking/client/main.lua index f250d735..e88b622b 100644 --- a/[esx_addons]/esx_banking/client/main.lua +++ b/[esx_addons]/esx_banking/client/main.lua @@ -105,7 +105,6 @@ local function StartThread() CreateBlips() while PlayerLoaded do - print('isInMarker', isInMarker, 'isInAtmMarker', isInAtmMarker) _PlayerPedId = PlayerPedId() _GetEntityCoords = GetEntityCoords(_PlayerPedId) local closestBank = {}