This commit is contained in:
P Gergő
2023-01-08 18:30:58 +01:00
committed by GitHub
parent b62be9ea91
commit dd634b66cc
+6 -1
View File
@@ -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