Garages
Last updated
Last updated
My script don't rely on any garage script, it saves the vehicles directly into your Database using the default ESX and QB/Qbox columns.
I can't make my script "compatible" with all the Garages because there's more than 50 (no cap, I just search it on Fivem releases).
So this is just a little "guide" to help you make the script "compatible" with your Garage script, of course all column names will vary from script to script.
If you have 0 clue on how database works please hire an experienced dev, use Fiverr or any other site where u can hire ppl.. I won't give you any support because this errors are not from my script.
First thing you need to do, BUY A VEHICLE in your test server and verify your server console, if you don't have ANY error and you can save and retrieve your vehicle from your garage then you are OK, you don't need to do anything else.
If you server console looks something like this:
Let's read what the error is telling us:
The script tried to save the vehicle into your player_vehicles table (or owned_vehicles if using ESX) BUT the column garage
does not exist in your table... oh wait, why!? Ah yes, because I'm using a different Garage script that altered my table and created/modified the default fields, let's fix it!
Go to your Database > player_vehicles
(or owned_vehicles if using ESX), check your columns names:
The error was about an unknown column named 'garage'.... oh wait! there's no garage column BUT we have a column named parking that my Garage script uses to store the garage name where the vehicle is stored.
What should we do now? We need to change the query in av_vehicleshop/server/editable/buy.lua
Here you will find 2 queries, one for QB and one for ESX, modify the one that belongs to the Framework you are using, for this example I'm using QBCore so I will modify line 10 (for ESX is line 22):
Once we have identified what query we need to modify and what's the column giving us the "error" we need to replace it.
Save the changes, restart av_vehicleshop and buy the vehicle again...
Did u got another column error? Let's repeat the steps we made for garage/parking but with this new column giving the error.
My script only register the vehicle into Database using the default Framework table structure, whatever happens after you spawn a vehicle from the garage it doesn't have anything to do with my script and is on you to solve it.