# Keys

Ever wanted to share your car with some friends? It's now possible!

{% hint style="info" %}
Keys lets you lock COMPLETELY your vehicles, **even the trunk**.
{% endhint %}

## Get a key

By default, the plugin makes sur you got keys in your inventory on login. But you can disable this feature in the [configuration file](/vehicleplusplus/features/keys/configuration.md).

There's also a command to give keys `/key give <player> [silent]`.\
The `[silent]` parameter is optional, if set to `true`, the command will not send any message in the chat. It can comes up useful when you're making shop or NPCs that just gives you a key.

## Lock/unlock a vehicle

In order to modify a vehicle's lockstate, you need to be either:

* A member of the vehicle's garage
* One of the vehicle's co-owners

If you are, then a simple right-click with keys in hand lets you lock or unlock a vehicle.

## Add co-owners

The most useful feature is co-owners. It lets you give players the rights to unlock/lock a specific vehicle.

You can see the list of a vehicle's co-owners by just shift right-clicking on a vehicle with keys.\
From there, you can remove and add players to this list.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vehicleplusplus.gitbook.io/vehicleplusplus/features/keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
