# Guides

## Ownership

**TLDR - No exports needed**

We have went to great lengths implementing a performant backend to handle a lot of automatic systems. Part of this system comes ownership management of vehicles.

We initialize certain values for future reference, these values are often possible to grab at runtime, but saving them once in the database offers a far more performant solution.

With this said, all of this should be handled automatically. You **do not** need any exports to manage the ownership for any normal dealershup. However, if you are experiencing issues, head over to our [Discord](https://discord.zykeresources.com/) and let us know, and we will make sure it automatically works for your server too.

## Keys

**TLDR - Smart piggybacking**

In addition to our automatic ownership systems, we have implemented a smart piggybacking system for key exports. This system instantly grants us backwards compatibility with hundreds of existing resources.

**Currently we support:**

* **wasabi\_carlock**
  * *<mark style="color:$info;">client/GiveKey</mark>*
  * *<mark style="color:$info;">client/GiveKeys</mark>*
  * *<mark style="color:$info;">client/HasKey</mark>*
  * *<mark style="color:$info;">client/RemoveKey</mark>*
  * *<mark style="color:$info;">server/GiveKey</mark>*
  * *<mark style="color:$info;">server/GiveKeys</mark>*
  * *<mark style="color:$info;">server/HasKey</mark>*
  * *<mark style="color:$info;">server/RemoveKey</mark>*
* **qb-vehiclekeys**
  * *<mark style="color:$info;">client/vehiclekeys:client:SetOwner</mark>*
  * *<mark style="color:$info;">server/qb-vehiclekeys:server:AcquireVehicleKeys</mark>*
  * *<mark style="color:$info;">server/qb-vehiclekeys:server:GiveVehicleKeys</mark>*
* **qs-vehiclekeys** *<mark style="color:$info;">(legacy support, won't add new due to their malicious history)</mark>*
  * *<mark style="color:$info;">client/GiveKey</mark>*
  * *<mark style="color:$info;">client/GiveKeys</mark>*
  * *<mark style="color:$info;">client/GetKey</mark>*
  * *<mark style="color:$info;">client/RemoveKeys</mark>*
  * *<mark style="color:$info;">server/GiveKey</mark>*
  * *<mark style="color:$info;">server/GiveKeys</mark>*
  * *<mark style="color:$info;">server/GetKey</mark>*
  * *<mark style="color:$info;">server/RemoveKeys</mark>*
* **Can't see your system here?** Let us know in [Discord](https://discord.zykeresources.com/) & we'll add it in!

## Keytool / Keychain

For `ox_inventory` specifically, you can utilize a "keytool", "keychain" or otherwise known as "container". You can store your keys in here, which greatly reduces inventory clutter.

Add in the base item in `ox_inventory/data/items.lua`

```lua
-- ox_inventory/data/items.lua
['keytool'] = {
    label = 'Keytool',
    weight = 100,
    stack = false,
    close = false,
},
```

You must then navigate into `ox_inventory/modules/items/container.lua` and place the operation to create the container. Follow the format you have in here, and place the snippet above the `return containers` that is on the last line.

If your vehicle key item is named anything other than `vehicle_keys`, change the name in here too.

```lua
-- ox_inventory/modules/items/container.lua
setContainerProperties('keytool', {
    slots = 10,
    maxWeight = 1000,
    whitelist = { 'vehicle_keys' }
})
```
