# 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 %}


---

# 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.av-scripts.com/laptop-pack-v3/racing/installation/redeem-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.
