mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
@@ -107,9 +107,9 @@ local function StartThread()
|
|||||||
while PlayerLoaded do
|
while PlayerLoaded do
|
||||||
_PlayerPedId = PlayerPedId()
|
_PlayerPedId = PlayerPedId()
|
||||||
_GetEntityCoords = GetEntityCoords(_PlayerPedId)
|
_GetEntityCoords = GetEntityCoords(_PlayerPedId)
|
||||||
|
local closestBank = {}
|
||||||
|
|
||||||
if IsPedOnFoot(PlayerPedId()) then
|
if IsPedOnFoot(PlayerPedId()) then
|
||||||
local closestBank = {}
|
|
||||||
|
|
||||||
for i = 1, #Config.AtmModels do
|
for i = 1, #Config.AtmModels do
|
||||||
local atm = GetClosestObjectOfType(_GetEntityCoords, 8.0, Config.AtmModels[i], false)
|
local atm = GetClosestObjectOfType(_GetEntityCoords, 8.0, Config.AtmModels[i], false)
|
||||||
@@ -151,6 +151,9 @@ local function StartThread()
|
|||||||
isInMarker = false
|
isInMarker = false
|
||||||
ESX.HideUI()
|
ESX.HideUI()
|
||||||
end
|
end
|
||||||
|
elseif not next(closestBank) and isInMarker then
|
||||||
|
isInMarker = false
|
||||||
|
ESX.HideUI()
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -247,6 +250,7 @@ end)
|
|||||||
AddEventHandler('onResourceStop', function(resource)
|
AddEventHandler('onResourceStop', function(resource)
|
||||||
if resource ~= GetCurrentResourceName() then return end
|
if resource ~= GetCurrentResourceName() then return end
|
||||||
RemoveBlips()
|
RemoveBlips()
|
||||||
|
ESX.HideUI()
|
||||||
if isInMenu then
|
if isInMenu then
|
||||||
CloseUi()
|
CloseUi()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user