---
name: "vehicles"
type: command
status: ok
groups: ["Object Detection"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/vehicles
revid: 377110
updated: 2026-01-01T10:06:56Z
---

# vehicles

*Command · Object Detection · Arma 3 v0.50 · introduced in Armed Assault v1.00*

Locality: effect **local**

## Description

Returns an array of all vehicles available to current client. This command returns both empty and crewed vehicles but not soldiers. It will also return "WeaponHolderSimulated" of dead bodies (weapon on the ground). Vehicles created with [createVehicleLocal](../commands/createVehicleLocal.md) will only be returned on the client that created them.

## Syntax

```sqf
vehicles
```

**Returns:** [Array](../topics/Array.md) of [Object](../topics/Object.md)s

## Examples

### Example 1

```sqf
_vehicles = vehicles;
```

## See also

[allGroups](../commands/allGroups.md) · [allUnits](../commands/allUnits.md) · [units](../commands/units.md) · [entities](../commands/entities.md) · [agents](../commands/agents.md) · [playableUnits](../commands/playableUnits.md) · [switchableUnits](../commands/switchableUnits.md) · [allPlayers](../commands/allPlayers.md) · [allDead](../commands/allDead.md) · [allDeadMen](../commands/allDeadMen.md) · [allUnitsUAV](../commands/allUnitsUAV.md) · [allCurators](../commands/allCurators.md) · [allObjects](../commands/allObjects.md) · [allMissionObjects](../commands/allMissionObjects.md) · [allSimpleObjects](../commands/allSimpleObjects.md) · [allMines](../commands/allMines.md)

## Community notes

**Sa-Matra** — 2024-06-18

This command returns a lot of crap that is not really a vehicle in a common sense - simulated weapon holders, clutter cutters, etc. It also skips "out" vehicles (disassembled drones and statics). Be careful iterating through it as it may be expensive.

Here is a list of most vehicle simulations that are returned by this command:

```sqf
airplanex
artillerymarker
car
carx
fire
helicopterrtd
lasertarget
motorcycle
nvmarker
parachute
paraglide
rope
shipx
submarinex
suppresstarget
tankx
thing
thingx
```

Generated using this code bit:

```sqf
private _sims = createHashMap;
{
    private _sim = toLowerANSI getText(_x >> "simulation");
    if!(_sim in _sims) then {
        _sims set [_sim, configName _x];
    };
} forEachReversed ("getNumber(_x >> 'scope') > 0" configClasses (configFile >> "CfgVehicles"));

private _used_sims = [];
{
    if(createVehicle [_y, [random 1e5,random 1e5,random 1e5], [], 0, "CAN_COLLIDE"] in vehicles) then {
        _used_sims pushBack _x;
    };
} forEach _sims;

_used_sims sort true;
copyToClipboard (_used_sims joinString toString [10]);
```

There is probably more simulations not listed like non-x versions of vehicle simulations but these are ones actually used in A3.

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