---
name: "setVehicleLock"
type: command
status: ok
groups: ["Object Manipulation"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setVehicleLock
revid: 364112
updated: 2024-05-04T22:05:25Z
---

# setVehicleLock

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

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

## Description

Sets vehicle lock. Possible values:

- "UNLOCKED"
- "DEFAULT"
- "LOCKED"
- "LOCKEDPLAYER"

## Syntax

```sqf
vehicleName setVehicleLock lockState
```

**Parameters:**

- `vehicleName`: [Object](../topics/Object.md)
- `lockState`: [String](../topics/String.md)

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

## Examples

### Example 1

```sqf
_veh1 setVehicleLock "LOCKED";
```

## See also

[lock](../commands/lock.md) · [locked](../commands/locked.md) · [lockDriver](../commands/lockDriver.md) · [lockCargo](../commands/lockCargo.md) · [lockTurret](../commands/lockTurret.md)

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