Merge pull request #824 from Rav3n95/develop

Fix for #821
This commit is contained in:
JackDUpModZ
2023-01-09 10:09:29 +00:00
committed by GitHub
+5 -1
View File
@@ -107,9 +107,9 @@ local function StartThread()
while PlayerLoaded do
_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 +151,9 @@ local function StartThread()
isInMarker = false
ESX.HideUI()
end
elseif not next(closestBank) and isInMarker then
isInMarker = false
ESX.HideUI()
end
end
@@ -247,6 +250,7 @@ end)
AddEventHandler('onResourceStop', function(resource)
if resource ~= GetCurrentResourceName() then return end
RemoveBlips()
ESX.HideUI()
if isInMenu then
CloseUi()
end