# Generate VIN for Vehicles

***

If you have a server running and players are already registered, you need to generate VIN numbers for your players' vehicles. Below you will find the points you need to go through to do this.

1. ### Database

{% hint style="warning" %}
If you have **vms\_garagesv2**, you can skip the first point, as you should already have a `vin` column in your vehicle table.
{% endhint %}

Make sure to add the `vin` column to your users table using the .sql file provided with the script

{% tabs %}
{% tab title="ESX" %}

```sql
ALTER TABLE `owned_vehicles` ADD COLUMN `vin` varchar(17) DEFAULT NULL;
```

{% endtab %}

{% tab title="QB-Core" %}

```sql
ALTER TABLE `player_vehicles` ADD COLUMN `vin` varchar(17) DEFAULT NULL;
```

{% endtab %}
{% endtabs %}

2. ### Generate VIN's

Now you can use the **`_generatevin`** command in your server console.

3. ### Final

When the process is complete, you will get this message in your console:

<figure><img src="/files/E7008Uu1hU2dQubyOw3m" alt=""><figcaption></figcaption></figure>

This means that the generation of VIN numbers has been completed, it is recommended to restart the server.


---

# 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://docs.vames-store.com/assets/vms_cityhall/guides/generate-vin-for-vehicles.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.
