---
name: "nearRoads"
type: command
status: ok
groups: ["Roads and Airports", "Object Detection"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/nearRoads
revid: 377410
updated: 2026-01-02T06:45:12Z
---

# nearRoads

*Command · Roads and Airports, Object Detection · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Find the road segments within the circle of given radius.

## Syntax

```sqf
pos nearRoads radius
```

**Parameters:**

- `pos`: [Object](../topics/Object.md) or [PositionAGL](../topics/Position.md#positionagl) or [Position2D](../topics/Position.md#introduction) - center of search radius
- `radius`: [Number](../topics/Number.md) - search radius in meters

**Returns:** [Array](../topics/Array.md) of [Object](../topics/Object.md)s - road segments within radius

## Examples

### Example 1

```sqf
_list = player nearRoads 50;
```

### Example 2

```sqf
_list = (position _unit) nearRoads 50;
```

### Example 3

```sqf
_list = [1800,5700] nearRoads 50;
```

## See also

[isOnRoad](../commands/isOnRoad.md) · [roadAt](../commands/roadAt.md) · [surfaceIsWater](../commands/surfaceIsWater.md) · [roadsConnectedTo](../commands/roadsConnectedTo.md) · [findNearestEnemy](../commands/findNearestEnemy.md) · [nearestBuilding](../commands/nearestBuilding.md) · [nearestObject](../commands/nearestObject.md) · [nearestObjects](../commands/nearestObjects.md) · [nearObjects](../commands/nearObjects.md) · [nearestLocation](../commands/nearestLocation.md) · [nearEntities](../commands/nearEntities.md) · [nearTargets](../commands/nearTargets.md) · [nearSupplies](../commands/nearSupplies.md) · [nearestLocationWithDubbing](../commands/nearestLocationWithDubbing.md) · [nearObjectsReady](../commands/nearObjectsReady.md) · [getRoadInfo](../commands/getRoadInfo.md) · [nearestTerrainObjects](../commands/nearestTerrainObjects.md) · [nearestMines](../commands/nearestMines.md)

<sub>Source: [BI Community Wiki — nearRoads](https://community.bistudio.com/wiki/nearRoads) (revision 377410).</sub>
