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.luafile are compatible with your specific Garage system. The default values are configured foresx_garageandqb-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:

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.GarageColumnandDatabase.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, orparking_id.Once you have the column name, add it toDatabase.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_vehiclestable—orowned_vehiclesif you are on ESX—for the name of the garage where you parked the car and place it inDatabase.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:
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.
Don't forget to delete the test command from your _database.lua before using your script in a live server.
Last updated