---
name: "vehicle"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/vehicle
revid: 376160
updated: 2025-09-08T19:48:37Z
---

# vehicle

*Command · Object Manipulation · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: arguments **global**

## Description

Vehicle in which given unit is mounted. If none, unit is returned. Alternatively, use [objectParent](../commands/objectParent.md)

> [!IMPORTANT]
> While [vehicle](../commands/vehicle.md) may return the vehicle the unit is in for **[alive](../commands/alive.md)** units, for dead units which are groupless, this command returns the unit itself - use [objectParent](../commands/objectParent.md) instead.

## Syntax

```sqf
vehicle unitName
```

**Parameters:**

- `unitName`: [Object](../topics/Object.md) - [alive](../commands/alive.md) unit

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

## Examples

### Example 1

SQS

```sqs
? vehicle player != player : hint "Player is in a vehicle"
```

### Example 2

SQF

```sqf
if (vehicle player != player) then { hint "Player is in a vehicle" };
```

## See also

[objectParent](../commands/objectParent.md)

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