> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/laptop-pack/racing/installation/redeem-vehicles.md).

# Redeem Vehicles

> If you are planning to reward players with vehicles—whether at the end of a season or at a specific level within the progression system—it is crucial to ensure that the current values in the `server/editable/_database.lua` file are compatible with your specific Garage system. The default values are configured for `esx_garage` and `qb-garages`, and we cannot guarantee compatibility with every third-party garage system.

* Go to av\_racing/server/editable/\_database.lua here you will find the following config fields:

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

* If using qb-core/qbox or custom framework, modify the values from line 10-16, for ESX users use lines 20-25.
* The fields modified by almost all garage scripts are `Database.GarageColumn` and `Database.DefaultGarage`, so we will focus on those two.
* For this step, you can ask the script's author if their script uses a different field than the one already included in my file, or you can go directly to your database and verify it yourself. Check the name of the garage column; the most common names are: `garage`, `garage_id`, `garageid`, `parking`, or `parking_id.`Once you have the column name, add it to `Database.GarageColumn`.
* Now we require the name of the garage where you want the vehicle to be stored. The easiest way to find the name if you don't know it is to buy any car from your vehicle shop and store it in the garage you want to use. Once stored, check your database in the `player_vehicles` table—or `owned_vehicles` if you are on ESX—for the name of the garage where you parked the car and place it in `Database.DefaultGarage`.

After making all the necessary modifications, you can use the following command to verify that everything is correct and that the vehicle is being stored in the garage properly:

```lua
-- copy/paste this command in the same _database.lua and run it in game /test
RegisterCommand("test", function(source)
    local identifier = exports['av_laptop']:getIdentifier(source)
    local res = addVehicle(identifier, "asea")
    print("Vehicle added correctly?", res)
end,false)
```

After using the command, check your server console (TxAdmin) to ensure there are no errors. Head to the garage you set in the configuration and verify that the vehicle we just assigned to you is there. If you have a console error, it is important to review the Database fields and enter the ones corresponding to your garage system. If you do not see the vehicle but have no errors, it is very likely because the garage name is incorrect; please verify it.

{% hint style="danger" %}
Don't forget to delete the test command from your \_database.lua before using your script in a live server.
{% endhint %}
