CreateThread(function()
local function nearbyElevator()
local sleep = 1250
if not nearbyGarageType or nearbyGarageType == 'boat' then return sleep end
local data = config.vehicleShowRooms[nearbyGarageType]
for k,v in pairs(data) do
local dst = #(playercoords - vec3(v.entry.x, v.entry.y, v.entry.z))
if dst > 20.0 then goto continue end
sleep = 0
DrawMarker(2, v.entry.x, v.entry.y, v.entry.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.15, 255, 255, 255, 255, false, false, false, true, false, false, false)
if dst > 3.0 then goto continue end
DrawText3D(v.entry.x, v.entry.y, v.entry.z + 0.5, '~r~[E]~s~ Back')
if IsControlJustPressed(0, Keys['E']) then
ExitGarage()
end
::continue::
end
return sleep
end
while true do
local sleep = nearbyElevator()
Wait(sleep)
end
end)