cd_garage.zip
folder and place this folder in your servers resource folder.ensure cd_garage
(it must be placed anywhere below your framework resource eg., es_extended, not above). The name of the folder must not be changed or the resource will not function correctly.cd_garage_jobvehicles
.UPDATE owned_vehicles SET impound = 0 WHERE impound > 0
.READ_ME_AFTER_PURCHASING
folder, the file is named SQL_main.sql
. Watch this video if you are unsure how to do this HeidiSQL / PHPMyAdmin.config.lua
and configure them to suit your server's needs. Please read the ”commented out help text” at the end of each line so you can understand what each config option does.dependencies
folder. The sub-folders inside will be the required dependencies. There will be a text file inside each sub-folder which includes a GitHub link. Download the dependencies from our GitHub using the links provided. Then add it to your resources folder.GetFuel()
and SetFuel()
functions in the configs/client_customise_me.lua
to work with your current vehicle fuel resource. You will see some pre-set examples which are hashed out."CHANGE_ME"
variable in the code snippet below to either the vehicles plate or the vehicles id.garage_type
should be set in the same SQL query that adds the vehicle to the database when the vehicle is purchased, as seen in this example.garage_type
can only be set to 3 values: 'car'
'boat'
'air'
. These values must be a string.'boat'
into the garage_type
column in the owned_vehicles / player_vehicles database table for this vehicle. And same for air vehicles. garage_type
in the database. But this event will only work if the player is sat inside the vehicle when the event is triggered.From client to client.
From server to client.
Config.JobVehicles.RegularMethod
table in the config. Each job has their own choice of vehicles that can be only used by players with said job.job_personalowned
column in the owned_vehicles / player_vehicles
database table needs to be set to the job name
of the player.From client to client.
From server to client.
identifier
column in the owned_vehicles / player_vehicles
database table needs to be set to a job name
.From client to client.
From server to client.
A
to Legion
you would also need to change the default value of the garage_id column in the owned_vehicles/player_vehicles database table to the new value you have chosen, so in our case, we would change it from A to Legion."vehicles"
database table, as this is very common in esx servers. So we will use this to store information for us to display on the garage UI’s.Config.VehiclesData
is enabled, the script will fetch the vehicle display name, vehicle class, vehicle price, and the garage tax amount (if Config.VehiclesData.garage_tax
is enabled), from the "vehicles" database table. This is simply the easiest way you can fully configure everything to your server's specific needs.Config.VehiclesData.VehicleDatabase_TableNames
in the config,lua.qb-core/shared.lua/QBShared.Vehicles
, as this is very common in QBCore servers. So we will use this to store information for us to display on the garage UI’s.Config.VehiclesData
is enabled, the script will fetch the vehicle display name, vehicle class, vehicle price, and the garage tax amount (if Config.VehiclesData.garage_tax
is enabled), from the shared.lua. This is simply the easiest way you can fully configure everything to your server's specific needs.Config.VehiclesData
is disabled, the script will alternatively get the vehicle display names from the vehicles handling files vehicles.meta
. Example: <gameName>Adder</gameName>
. But the vehicle classes/prices will not be displayed on the garage UIs and the Config.VehiclesData.garage_tax will be automatically disabled.cd_garage.
“BLOB/TEXT column 'adv_stats' can't have a default value”
ER_BAD_FIELD_ERROR: Unknown colum 'job_personalspawn' in 'where clause'.
plate
column in the owned_vehicles/player_vehicles database table for the one of this players vehicles is NULL or not a string.adv_stats
column in the owned_vehicles/player_vehicles database table for one of this players vehicles is NULL or not a table.vehicle/mods
column in the owned_vehicles/player_vehicles database table for one of this players vehicles is NULL or not a table.garage_id
column in the owned_vehicles/player_vehicles database table for one of this players vehicles is NULL or not a string.property
column in the owned_vehicles/player_vehicles database table for the one of this players vehicles is NULL or not a number
.in_garage
column in the owned_vehicles/player_vehicles database table for one of this players vehicles is NULL or not a boolean, (this column needs to be a TINYINT, 0 or 1).GetJob_grade()
function in the client_customise_me.lua
returned nil when it should have returned a number.vehicle/mods
column in the owned_vehicles/player_vehicles database table for one of this players vehicles is an empty table, when it should include the vehicles props data. The easiest fix is to delete this vehicle from your database. But the cause on QBCore is normally that this event is not being triggered/not functioning correctly.garage_id
's in the Config.GangGarages is the same as one of your Garage_ID
's in the Config.Locations. You can not have duplicates.You lack the required entitlement?
and check for 2 client-sided prints saying Loaded Successfully!
.cd_garage
folder, download and add in the latest version, reconfigure the configs folder and restart your server.avisa
submarine not being storable in boat garages.GetGarageCount
and GetGarageLimit
functions not functioning correctly on QBCore servers.Config.VehicleDatabasePlateType
enabled.