> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vehicle locked/unlocked

> Triggered client side when a vehicle's lock state changes.

Triggered when the vehicle lock has been toggled.

```lua Event theme={null}
RegisterNetEvent("vehicles_keys:vehicleLockChanged", function(vehicle, isLocked)

end)
```

### Parameters

| Name       | Data Type | Description                              |
| ---------- | --------- | ---------------------------------------- |
| `vehicle`  | integer   | Vehicle handle                           |
| `isLocked` | boolean   | Whether the vehicle is now locked or not |

## Example

```lua theme={null}
RegisterNetEvent("vehicles_keys:vehicleLockChanged", function(vehicle, isLocked)
    print("The vehicle " .. vehicle .. " is now " .. (isLocked and "locked" or "unlocked"))
end)
```

<Note>
  Place this code in the file `integrations/cl_integrations.lua` of the script, at the bottom of the file on new lines.
</Note>


## Related topics

- [Vehicle locked/unlocked](/vehicles-keys/server/vehicle-locked-unlocked.md)
- [Server](/vehicles-keys/server/index.md)
- [Client](/vehicles-keys/client/index.md)
- [Set door ID state (locked/unlocked)](/doors-creator/server/set-door-id-state-locked-unlocked.md)
- [Create building](/doors-creator/server/create-building.md)
