# 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="https://3701050178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6y0J5nnTjSyc65fbCvIU%2Fuploads%2FuMoiCKTRRf9kdYIBAwwn%2Fimage.png?alt=media&#x26;token=0942355c-3bac-4143-af93-ec498c330724" alt=""><figcaption></figcaption></figure>

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