---
name: "locked"
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/locked
revid: 310835
updated: 2022-05-07T20:23:59Z
---

# locked

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

Locality: arguments **global**

## Description

Check if [vehicle](../commands/vehicle.md) is locked. If it is locked, [Persons](../topics/Object.md#person) cannot mount / dismount without order.

## Syntax

```sqf
locked vehicle
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md)

**Returns:** - [Number](../topics/Number.md) - since Arma 3 v0.50
  - 0: Unlocked
  - 1: Default - a subordinate player cannot enter without AI leader order
  - 2: Locked
  - 3: Locked for player
  - -1: vehicle [is null](../commands/isNull.md)
- [Boolean](../topics/Boolean.md) for older games

## Examples

### Example 1

```sqf
_locked = locked _jeepOne;
```

## See also

[lock](../commands/lock.md) · [setVehicleLock](../commands/setVehicleLock.md) · [lockedDriver](../commands/lockedDriver.md) · [lockedCargo](../commands/lockedCargo.md) · [lockedTurret](../commands/lockedTurret.md)

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