---
name: "leaveVehicle"
type: command
status: ok
groups: ["Unit Control", "Groups"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/leaveVehicle
revid: 347946
updated: 2023-11-07T05:26:00Z
---

# leaveVehicle

*Command · Unit Control, Groups · Arma 3 v0.50 · introduced in Arma 2 v1.00*

Locality: arguments **local** · effect **local**

## Description

Ceases the using of the vehicle by a group and unassigns vehicle from the group.
If the argument is a single unit, the vehicle will be unassigned from unit's group.
After vehicle is unassigned from the group, each individual crew member then unassigned from the vehicle.

In short the command could be hypothetically presented as:

```sqf
leaveVehicle = un-addVehicle + unassignVehicle forEach crew
```

However, to make it more reliable, it is best to move unit out of the vehicle manually with [moveOut](../commands/moveOut.md) and force unassign the vehicle with [unassignVehicle](../commands/unassignVehicle.md).

> [!NOTE]
> See AI Group Vehicle Management for more information.

## Syntax

```sqf
group leaveVehicle vehicle
```

**Parameters:**

- `group`: [Group](../topics/Group.md) or [Object](../topics/Object.md) - object's [Group](../topics/Group.md) is used
- `vehicle`: [Object](../topics/Object.md)

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

## Examples

### Example 1

```sqf
_unit leaveVehicle _vehicle;
```

### Example 2

```sqf
_grp leaveVehicle _vehicle;
```

## See also

[addVehicle](../commands/addVehicle.md) · [assignAsCargo](../commands/assignAsCargo.md) · [assignAsCommander](../commands/assignAsCommander.md) · [assignAsDriver](../commands/assignAsDriver.md) · [assignAsGunner](../commands/assignAsGunner.md) · [assignedVehicle](../commands/assignedVehicle.md) · [unassignVehicle](../commands/unassignVehicle.md) · [doGetOut](../commands/doGetOut.md) · [commandGetOut](../commands/commandGetOut.md) · [createVehicleCrew](../commands/createVehicleCrew.md) · [assignedVehicles](../commands/assignedVehicles.md) · [assignedGroup](../commands/assignedGroup.md) · [fullCrew](../commands/fullCrew.md)

## Community notes

**Killzone_Kid** — 2013-08-31

In Arma 3 this command will not force a player to exit from a vehicle. It will unassign vehicle role for this player. AI crew however will also disembark.

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