fix(esx_banking): ATM could be opened everywhere

This commit is contained in:
RoadToSix
2022-10-29 01:32:24 +02:00
parent c2afda0914
commit 67e3dd5e00
+2 -2
View File
@@ -172,11 +172,11 @@ local function StartThread()
PedHandler(closestPed)
end
if not isInMenu and IsPedOnFoot(PlayerPedId()) then
if IsPedOnFoot(PlayerPedId()) then
local closestBank = {}
for i = 1, #Config.AtmModels do
local atm = GetClosestObjectOfType(_GetEntityCoords, 3.0, Config.AtmModels[i], false)
local atm = GetClosestObjectOfType(_GetEntityCoords, 8.0, Config.AtmModels[i], false)
if atm ~= 0 then
local atmOffset = GetOffsetFromEntityInWorldCoords(atm, 0.0, -0.7, 0.0)
local atmHeading = GetEntityHeading(atm)