Links

Garage

Step-by-step installation guide, common issues & solutions, code snippets, error codes, config previews, locales previews, SQL previews, and changelogs; all in 1 easily accessible place.
YouTube Showcase Video - check out our NEW cinematic showcase video!
This resource can be purchased as part of a bundle for a discount here.

Translate

START HERE

1. Unzip the cd_garage.zip folder and place this folder in your servers resource folder.
2. Add the resource to your server start config: ensure cd_garage (it must be placed anywhere below your framework resource eg., es_extended, not above).
3. WARNING The name of the folder must not be changed or the resource will not function correctly.
4. WARNING Do not edit the encrypted files in any way.

INSTALLATION GUIDE

Step 0 - For existing customers

ALL EXISTING CUSTOMERS WHO WERE USING PREVIOUS VERSIONS ON ESX MUST FOLLOW THE 2 STEPS BELOW:
  • Use this chat command in your server console before any player joins - cd_garage_jobvehicles.
  • Remove all vehicles from the impound in your database - Either manually set them all to 0 in the impound column OR execute this SQL query in your database UPDATE owned_vehicles SET impound = 0 WHERE impound > 0.
If you have recently purchased this resource for the first time you do NOT need to follow the steps above.

Step 1 - Install the SQL

You MUST import the SQL file to your database. This SQL file is located inside theREAD_ME_AFTER_PURCHASING folder, the file is named SQL_main.sql. Watch this video if you are unsure how to do this HeidiSQL / PHPMyAdmin.

Step 2 - Fxmanifest

You may need to make some changes to the fxmanifest.lua, depending on your framework and dependencies. We have made this easier for you by commenting on the lines which you may need to change.

Step 3 - Configure the resource

You MUST read all of the configurable options inside the 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.
The most important sections are the options under the Framework and Important sections at the top of the config.lua. Everything else is optional.

Step 4 - Configure your key binds

Before starting this resource on your main/live server we highly advise you to configure your key binds because this resource uses Fivem's Key Mapping.
Why? Well long story short;- once a player has joined your server with this resource running you can no longer force change their key binds for this resource through the config.lua, only they can change it in the in-game pause menu settings. Although it will change for the players who join after you have changed it.
The benefit of this system is that it's much more optimised and players can easily change their own key binds on keyboards or controllers. You can also check out the Default Keybinds for this resource.

Step 5 - Install the dependencies

Open the 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.

Step 6 - Vehicle fuel

If you use a vehicle fuel resource you will need to modify the 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.

Step 7 - Vehicle plate format

What is vehicle plate formats?

Your vehicle shop/car dealer is the script that usually decides what plate format owned vehicles will use on your server. So you need to configure the Config.PlateFormats in the config.lua to what plate format your server uses. We have added compatibility with all 3 known plate formats.

Short Explanation

By default every vehicles plate in FiveM is 8 characters long. So for example if your vehicle shop forces the plate to be 4 characters long, when you use the FiveM native to get a vehicles plate GetVehicleNumberPlateText(vehicle), this will return a string that is 8 characters long even though the plate is 4 characters long on your vehicle in-game (ABCD); because FiveM will add whitespaces until the plate is 8 characters long including whitespaces.

Vehicle Shops

Your vehicle shop will get the plate as explained above, and will modify the plate using one of the known 3 methods explained below before it saves it to the database.
PLEASE READ CAREFULLY!
You must complete this step correctly. You need to read the information below and confirm which plate format your server uses.
Please make sure to read all 3 options below carefully before confirming which one you use.
Please note that you NEED to use the plate format your server already uses, changing them just because you like the benefits can cause script-breaking issues.
1. Trimmed
2. With Spaces
3. Mixed (qbcore+esx_vehicleshop)
What do you mean by "trimmed" plate format?
By "trimmed" we mean your vehicle shop removes all spaces and whitespaces from the default 8-character plate.
Are your plates all 8 characters with no spaces?
If this is the case and you never want to have spaces in the middle of your plates then you can use this option and ignore the examples below. This option is much easier to install.

Example of how the modified "trimmed" plate looks on PRINTS on short plates.

Example of how the modified "trimmed" plate will look in the DATABASE on short plates.
Example of how the modified "trimmed" plate will look IN-GAME on short plates.

Does your server use the "trimmed" vehicle plate format?

Then you need to set the Config.PlateFormats in the config.lua to 'trimmed'.
What do you mean by "with spaces" plate format?
By "with spaces" we mean your vehicle shop does not modify the plate at all, so all plates will be 8 characters long no matter how many letters or numbers are in the plate because it will include whitespaces to make the length 8.
Are your plates all 8 characters with no spaces?
If this is the case and you do want to have spaces in the middle of your plates then you can use this option and ignore the examples below. This option is much more difficult to install.

Example of how the modified "with spaces" plate looks on PRINTS on short plates.

Example of how the modified "with spaces" plate will look in the DATABASE on short plates.
Example of how the modified "with spaces" plate will look IN-GAME on short plates.

Does your server use the "with_spaces" vehicle plate format?

Then you need to set the Config.PlateFormats in the config.lua to 'with_spaces'.
What do you mean by "mixed" plate format?
By "mixed" we mean your vehicle shop will remove any whitespaces at the start and at the end of the plate, but it will not remove spaces in the centre of the plate. You should only be using this option if you use Qbcore or esx_vehicleshop.
QBCore: This option is recommended for QBCore servers as this is what QBCore also uses in its get plate function. Normally QBCore's plates are 8 characters long with no spaces at all so the examples below may not be relevant to you.
esx_vehicleshop: If your vehicle plates in the database are the same format as the examples below you should use this option; as some esx vehicle shops by default force the plate format to be 7 characters long with a space in the middle.

Example of how the modified "mixed" plate will look on PRINTS on short plates.

Example of how the modified "mixed" plate will look in the DATABASE on short plates.
Example of how the modified "mixed" plate will look IN-GAME on short plates.

Does your server use the "mixed" vehicle plate format?

Then you need to set the Config.PlateFormats in the config.lua to 'mixed'.

To sum up the above:

Do you use QBCore?

Use the "mixed" option.

Do you use esx_vehicleshop and your plates are formatted like [ABC 123]?

Use the "mixed" option.

My plates are 8 characters with no spaces?

Use the "trimmed" option.

OPTIONAL MODIFICATIONS

Vehicle Keys

How does vehicle keys work?
If you are using the built in vehicle keys system, you will need to trigger an event every time you spawn a vehicle in other non-codesign resources eg., /car command, vehicle shop(s), civilian job vehicles(s), etc.
Do you use QBCore? We have added event handlers for the default QBCore qb-keys in cd_garage, meaning: you no longer need to edit the give-key events in your resources - so you can skip this step.
From client to client
From server to client
Simply copy the code snippet below and paste it into any resource where you want the player to have the keys to a vehicle.
Example 1
Example 2
You need to make sure vehicle is defined.
TriggerEvent('cd_garage:AddKeys', exports['cd_garage']:GetPlate(vehicle))
If the "plate" is already defined; simply send the plate in the first argument, as seen in the code snippet below. If the plate is not defined, then you can not give keys to a player from the server side.
TriggerClientEvent('cd_garage:AddKeys', source, plate)

Boat & Air garages

How does boat & air garages work?
When a player purchases a boat/air vehicle, the script requires you to update the garage_type for this vehicle in the database. If you do not use boat/air vehicles, you can ignore this as the default garage_type value in the database is car.
Option 1 - SQL query
Option 2 - event
Ideally the garage_type should be set in the same SQL query that adds the vehicle to the database when the vehicle is purchased.
The garage_type can only be set to 3 values: 'car' 'boat' 'air' . These values must be a string.
For example; in order to make a boat show in the boat garage you need to edit the SQL query in your vehicle shop to insert 'boat' into the garage_type column in the owned_vehicles / player_vehicles database table for this vehicle. And the same for air vehicles.

Example

ESX example - this is an example for esx_boatshop.
You don't need to do this for cars/bikes as the default value In the database for this column is always ’car’.
You can also trigger this client-side event to automatically update the garage_type in the owned_vehicle/player_vehicles database table.

Example

QBCore example - this is an example of where you should add the event for qb-vehicleshop.
client-side to client-side
TriggerEvent('cd_garage:UpdateGarageType')
server-side to client-side
TriggerClientEvent('cd_garage:UpdateGarageType', source)
This event will only work if the player is sitting inside the vehicle when the event is triggered.

Property Garages

How does property garages work?
If you use a paid property resource, then it's really the developer of said resource who will be best suited to help you with the property garages, as the Codesign Team doesn't have access to their resources and we can't have access to them without the developers permission, considering we haven't purchased them. But, we have made it extremely simply for you yourself to implement this into your property resource.
Click here to view the drag-and-drop code snippets for compatibility with some housing scripts.
Spawning a vehicle from a property garage
From client to client
From server to client
How do I choose the type of garage to open:
Choose either 'quick' or 'inside' in the 1st argument.
Choose the shell to enter if you use the inside garage:
Replace nil with '10cargarage_shell' or '40cargarage_shell' in the 2nd argument.
TriggerEvent('cd_garage:PropertyGarage', 'quick', nil)
How do I choose the type of garage to open:
Choose either 'quick' or 'inside' in the 2nd argument.
Choose the shell to enter if you use the inside garage:
Replace nil with '10cargarage_shell' or '40cargarage_shell' in the 3rd argument.
TriggerClientEvent('cd_garage:PropertyGarage', source, 'quick', nil)
Storing a vehicle in a property garage
From client to client
From server to client
The 1st and 2nd argument must always stay the same.
TriggerEvent('cd_garage:StoreVehicle_Main', 1, false, false)
The 2nd and 3rd argument must always stay the same.
TriggerClientEvent('cd_garage:StoreVehicle_Main', source, 1, false, false)

Persistent Vehicles

How does persistent vehicles work?
Our persistent vehicle feature will save and respawn any vehicles that have despawned either while you are in the server or after you have re-logged. Please note that vehicles will not save and respawn after a server restart.
If you use this feature you will have to add the event below to remove a persistent vehicle, otherwise, when you use the /dv chat command to delete a vehicle, it will respawn.
Remove a vehicle from the persistent vehicle list
From client-to-server
From server-to-server
You must send the vehicles plate in the 1st argument.
TriggerServerEvent('cd_garage:RemovePersistentVehicles', exports['cd_garage']:GetPlate(vehicle))
You must send the vehicles plate in the 1st argument.
TriggerEvent('cd_garage:RemovePersistentVehicles', exports['cd_garage']:GetCorrectPlateFormat(plate))

Job Garages

How do job garages work?
We have 3 options for job garages, each job garage location can be set to use a different method and needs to be implemented in a different way.
This garage script does not include any kind of vehicle shop, so if you choose to use the Personal Owned or Society Owned methods you would need to sort that out yourself.
Regular
These are spawned in vehicles and are not owned by anyone.
Option 1 - Config.JobVehicles.RegularMethod
Add the vehicles of your choice to the Config.JobVehicles.RegularMethod table in the config. Each job has its own choice of vehicles that can be only used by players with said job.
Personal Owned
Personal owned job vehicles are vehicles that you have purchased from a car dealer and only you can access them from your job garage.
Option 1 - SQL query
Option 2 - event
Ideally, this should be set in the same SQL query that adds the vehicle to the database when the vehicle is purchased. This is how it should look in the database.
For example; when a player purchases a vehicle from the vehicle shop, the job_personalowned column in the owned_vehicles / player_vehicles database table needs to be set to the job name of the player.
You can also trigger this client-side event to set the vehicle a player is currently in into a personal owned job vehicle. But this event will only work if the player is sitting inside the vehicle when the event is triggered.
client-side to client-side
TriggerEvent('cd_garage:SetJobOwnedVehicle', 'personal')
server-side to client-side
TriggerClientEvent('cd_garage:SetJobOwnedVehicle', source, 'personal')
Society Owned
Society owned vehicles will allow all players of the same job to use all of the vehicles their job owns at their job garage.
Option 1 - SQL query
Option 2 - event
Ideally, this should be set in the same SQL query that adds the vehicle to the database when the vehicle is purchased. This is how it should look in the database.
For example, when a player purchases a vehicle from the vehicle shop, the identifier column in the owned_vehicles / player_vehicles database table needs to be set to a job name.
You can also trigger this client-side event to set the vehicle a player is currently in into a society owned job vehicle. But this event will only work if the player is sitting inside the vehicle when the event is triggered.
client-side to client-side
TriggerEvent('cd_garage:SetJobOwnedVehicle', 'society')
server-side to client-side
TriggerClientEvent('cd_garage:SetJobOwnedVehicle', source, 'society')

Changing Garage Names

If you wish to change the names of the garages from eg., A to Legion you would need to configure them in the Config.Locations in the config.lua, and also 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.
But you MUST do this before any player joins otherwise, you would have to manually change the garage_id from A to Legion in the database for every player whose garage_id was is to A.

Vehicles Data

ESX
QBCore
Disabled
On ESX we will grab this data from the "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 UIs.
If 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.
Multiple "vehicles" database tables
We were made aware that some servers use multiple "vehicles" database tables for donator vehicles, emergency vehicles etc. So all you need to do is add the names of these database tables into the Config.VehiclesData.VehicleDatabase_TableNames in the config,lua.
On QBCore we will grab this data from the 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 UIs.
If 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.
Although this is not required, because if Config.VehiclesData is disabled, the script will alternatively get the vehicle display names from the vehicle 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.

Custom vehicle logos

Credits to @Baby Amnesia for making this tutorial.

QBCore

Property Garage
This is already implemented and you don't need to make any additional changes, of course assuming your using the official QBCore's latest version.
Vehicle Keys
We have added event handlers for the default QBCore qb-keys in cd_garage, meaning: you no longer need to edit the give-key events in your resources.
Phone
Replace the existing code snippet in the qb-phone/server/main.lua/line 196. This code snippet is inside the qb-phone:server:GetPhoneData server callback. (the exact line may vary depending on your version).
Note: Config.VehiclesData.ENABLE must be set to true in the config.lua.
local garageresult = MySQL.query.await('SELECT * FROM player_vehicles WHERE citizenid = ?', {Player.PlayerData.citizenid})
if garageresult[1] ~= nil then
for _, v in pairs(garageresult) do
local vehicleModel = v.vehicle
if QBCore.Shared.Vehicles[vehicleModel] ~= nil then
v.garage = v.garage_id
v.vehicle = QBCore.Shared.Vehicles[vehicleModel].name
v.brand = QBCore.Shared.Vehicles[vehicleModel].brand
end
end
PhoneData.Garage = garageresult
end
Not using default mechanic script? (error_code-013552)
If you have been re-directed here from the error code 013552; there could be 3 reasons for this:
  1. 1.
    This trigger event in qb-vehicleshop has been removed or is not being triggered.
  2. 2.
    This register event in qb-mechanicjob has been removed or is not receiving the event correctly.
  3. 3.
    You have removed/replaced the default qb-mechanicjob script. If you have replaced it and your having this issue then the new script doesn't have this register event for some strange reason. You can copy paste the code snippet below into the server side of any script.
function IsVehicleOwned(plate)
local result = MySQL.scalar.await('SELECT 1 from player_vehicles WHERE plate = ?', {plate})
if result then
return true
else
return false
end
end
RegisterNetEvent('qb-vehicletuning:server:SaveVehicleProps', function(vehicleProps)
if IsVehicleOwned(vehicleProps.plate) then
MySQL.update('UPDATE player_vehicles SET mods = ? WHERE plate = ?',
{json.encode(vehicleProps), vehicleProps.plate})
end
end)

INFORMATION

Default Key Binds

Please Read Here for more information regarding key mapping.
Key
Description
E
Open the outside quick garage.
H
Enter the inside garage.
G
Store your vehicle.
E
Hotwire a vehicle.
M
Toggle vehicle lock.

Chat commands

All of these chat commands can be renamed and disabled/enabled in the config/code.
If a command isn't working, make sure the config option for the said feature is enabled in the config.lua.
Command
Description
/impound
Impound system to impound a vehicle.
/transfervehicle
Transfer system to transfer a vehicle to another player.
/checkmiles
Check the mileage of the vehicle you are in.
/garagespace
Players with defined jobs can sell garage slots to other players.
/garagespacecheck
Check how many garage spaces you have.
/vehicle-add
(Staff only) Add the vehicle you are currently sat inside to a player's garage.
/vehicle-delete
(Staff only) Delete the vehicle you are currently sat inside from the database.
/vehicle-plate
(Staff only) Change the plate of the vehicle you are currently sat inside.
/vehicle-keys
(Staff only) Give yourself keys to the vehicle you are currently sat inside.
/privategarage
Players with defined jobs can create and sell private garages to players.
/removefakeplate
Remove a fake plate from the closest vehicle.
/givekey
Give temporary keys (keys delete after server restart) to to the closest player to the closest vehicle.
/givekeysave
Give saved keys (keys save in database) to to the closest player to the closest vehicle.
/removekey
Open the keys UI to remove keys you have given out to other players.
/vehlock
Toggle vehicle lock.
/lockpick
Lockpick closest vehicle.

Events

These events are completely optional, you can use them if needed. These are less important events, the more important events are documented in the other sections above.
client-side to client-side
server-side to client-side
server-side to server-side
Mileage
Check a vehicle's mileage.
TriggerEvent('cd_garage:checkmileage')
Impound vehicles
Opens the impound UI. You can send a vehicles id as the first argument, otherwise, it will choose the closest vehicle.
TriggerEvent('cd_garage:ImpoundVehicle')
Transfer Vehicle
Transfer the vehicle you are sat in. You must send the player's server-id in the first argument.
TriggerEvent('cd_garage:TransferVehicle', playerid)
Vehicle Lock
Toggle vehicle lock of the closest vehicle.
TriggerEvent('cd_garage:ToggleVehicleLock')
Update Garage Type
Update the database with the correct garage_type for the vehicle a player is sat in.
TriggerEvent('cd_garage:UpdateGarageType')
Mileage
Check a vehicle's mileage.
TriggerClientEvent('cd_garage:checkmileage', source)
Impound vehicles
Opens the impound UI. You can send a vehicles id as the first argument, otherwise, it will choose the closest vehicle.
TriggerClientEvent('cd_garage:ImpoundVehicle', source)
Transfer Vehicle
Transfer the vehicle you are sat in. You must send the player's server-id in the second argument.
TriggerClientEvent('cd_garage:TransferVehicle', source, target_source)
Vehicle Lock
Toggle vehicle lock of the closest vehicle.
TriggerClientEvent('cd_garage:ToggleVehicleLock', source)
Update Garage Type
Update the database with the correct garage_type for the vehicle a player is sat in.
TriggerClientEvent('cd_garage:UpdateGarageType', source)
Save Mileage Timer
Trigger this event around 1 minute before a server restart to force save the mileage of every owned vehicle.
TriggerClientEvent('cd_garage:SaveAllMiles', -1)
Save Vehicle Damage Timer
Trigger this event around 1 minute before a server restart to force save the vehicle damage of every owned vehicle. Requires Config.VehicleKeys.ENABLE to be enabled.
TriggerClientEvent('cd_garage:SaveAllVehicleDamage', -1)
Save Impound Timer
Trigger this event around 1 minute before a server restart to force save the impound timer time of all vehicles in the impound to the database.
TriggerEvent('cd_garage:SaveImpoundTimers')

Exports

These exports are completely optional, you can use them if needed.
client-side exports
server-side exports
Get Garage Type
Returns the type of vehicle the player is sat in (‘car’ / ‘boat’ / ‘air’) (string).
exports['cd_garage']:GetGarageType(vehicle)
Get Mileage Data
Returns the mileage table which includes; plate, mileage, maxhealth (table).
exports['cd_garage']:GetAdvStats(plate)
Get Keys Data
Returns a players full key table which includes; all vehicles they have keys to (table).
exports['cd_garage']:GetKeysData()
Does Player Have Keys
Returns if the player has keys to the defined vehicle (boolean).
exports['cd_garage']:DoesPlayerHaveKeys(plate)
Get Plate
Returns the vehicle plate from the vehicle the player is sat in (string).
exports['cd_garage']:GetPlate(vehicle)
Get Correct Plate Format
Returns the correct plate format decided by the Config.VehicleDatabasePlateType (string).
exports['cd_garage']:GetCorrectPlateFormat(plate)
Get Config
Returns the full garage config (table).
exports['cd_garage']:GetConfig()
Get Vehicles Data
Returns a large table from the cached vehicles data of all vehicles which includes; name, hash, price, category, model (table).
exports['cd_garage']:GetVehiclesData()
Get Garage Limit
Returns a player's garage limit amount (number).
exports['cd_garage']:GetGarageLimit(source)
Get Garage Count
Returns the number of vehicles a player owns (number).
exports['cd_garage']:GetGarageCount(source, garage_type)
Get Mileage Data
Returns the mileage table which includes; plate, mileage, maxhealth (table).
exports['cd_garage']:GetMaxHealth(plate)
Get Config
Returns the full garage config (table).
exports['cd_garage']:GetConfig()
Get Vehicles Data
Returns a large table from the cached vehicles data of all vehicles which includes; name, hash, price, category, model (table).
exports['cd_garage']:GetVehiclesData()

COMMON ISSUES

Please check out our Troubleshooting Guide before contacting our support.
🔔 Folder Name Make sure the name of the folder is cd_garage.
Screen Flickering?
eg., if your screen is flickering while using cd_easytime.
✔️ This is due to you having multiple time/weather sync scripts running at the same time fighting each other eg., vSync or vMenu. Stop the other time/weather script that is causing this or stop cd_easytime and remove it from the dependencies in the fxmanifest.lua of cd_garage.
SQL Default Value?
eg., if you see an error similar to this example when inserting an SQL query into your database - “BLOB/TEXT column 'adv_stats' can't have a default value”.
✔️ You can use “VARCHAR(256)” instead of “LONGTEXT” in the SQL query.
SQL Unknown Column?
eg., if you see an SQL error in the server console similar to this example - ER_BAD_FIELD_ERROR: Unknown colum 'job_personalspawn' in 'where clause'.
✔️ You are missing one of the required database columns. The SQL file can be found in the "READ_ME_AFTER_PURCHASING" folder.

ERROR CODES

If you see an error code which isn't listed below please open a script support ticket in the Codesign Discord.
Server
Client
6458145 - #Step 1 has not been completed correctly, you have not added the adv_stats database column.
468454 - #Step 1 has not been completed correctly, you have not added the vehicles database table.
46584645 - #Step 1 has not been completed correctly, you have not added the impound and impound_data database columns.
5454 - #Step 1 has not been completed correctly, you have not added the cd_garage_keys database table.
3122 - #Step 1 has not been completed correctly, you have not added the cd_garage_privategarage database table.
1975 - The vehicle in the print below this print has not been added to QBCore's shared vehicle table.
0985 - In your QBCore shared vehicle table, the hash of the specified vehicle has been formatted incorrectly. Currently, it is in a string format, but you need to use backticks instead of apostrophes.
1654651 - The plate column in the owned_vehicles/player_vehicles database table for one of this player's vehicles is NULL or not a string.
87458434 / 3216584884 - The adv_stats column in the owned_vehicles/player_vehicles database table for one of this player's vehicles is NULL or not a table.
77745646844 / 66546544658 - The vehicle/mods column in the owned_vehicles/player_vehicles database table for one of this player's vehicles is NULL or not a table.
2472782 - The garage_id column in the owned_vehicles/player_vehicles database table for one of this player's vehicles is NULL or not a string.
465146541 - The property column in the owned_vehicles/player_vehicles database table for one of this players vehicles is NULL or not a number.
6584165 - The in_garage column in the owned_vehicles/player_vehicles database table for one of this player's vehicles is NULL or not a boolean, (this column needs to be a TINYINT, 0 or 1).
63548 - The GetJob_grade() function in the client_customise_me.lua returned nil when it should have returned a number.
013552 - The vehicle/mods column in the owned_vehicles/player_vehicles database table for one of this player's vehicles is an empty table. But it should include the vehicle props data. The easiest fix is to delete this vehicle from your database. But the cause on QBCore is explained here with a solution #QBCore.
3459 - One of the 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.

CHANGELOG

Files Changed: Not every update requires you to replace the whole folder. We do this because we understand it's a pain to redo the configs for every update.
  • All Files - This means you should delete your old cd_garage folder, download and add in the latest version, reconfigure the configs folder and restart your server.
  • Specific Files - This means you can simply copy and paste the SPECIFIC new files over the old ones and restart the server.
Update Type: On rare occasions, you are forced to update to the latest version. Mostly due to authentication updates where the old versions will no longer work.
  • Mandatory - This means you MUST update to this new version or the old versions will no longer work.
  • Optional - This means it's completely your choice whether you wish to update to the latest version. But we do not offer support for old versions for obvious reasons; they are old.
v3.0.0 - v3.0.7
v4.0.0
v4.0.1 - v4.1.0
v4.2.0
4.2.1
4.2.2

26/12/2020 - 21/06/2021

v3.0.0 - v3.0.7
Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • Added search option to quick and impound menu
  • Vehicles can now be searched by name, location, plate or manufacturer
  • Added option to allow multiple jobs to use the JobRestricted garages
  • Added a staff command to change the plate of the vehicle you are in. This will allow custom plates to be used
  • Added logs for the vehicle management commands
  • Added a new function called SetFuel(), (just under the GetFuel() function) to the client_customise_me which will make adding compatibility with fuel scripts much easier. The read me has also been updated
  • Added a check for the /vehicle-plate command to make sure you can not change a plate to one that already exists
  • Added the vehicle labels to the transfer vehicle webhooks (ONLY when used from the chat command)
  • Added the ability to rename all esx events such as the setjob and playerloaded events
  • When using the regular job garage we added the ability to restrict cars to certain job grades
  • Added the ability to have dedicated car/air/boat garages for job garages. This will work with all 3 types of job garages
  • Added an event that you can trigger after a player purchases a vehicle and it will update the garage_type in the database
  • Added an event that you can trigger after purchasing a job vehicle and it will set the vehicle as a job owned vehicle (you can choose if you want this vehicle to be personal owned or society owned)
  • Added full locales to the discord logs so you no longer need to redo them every time the file is updated
Edit
  • Updated quick menu design
  • Improved load time of quick menu
  • Major optimisation of the client side ms usage
  • Updated all of the stylings of the logs
  • If you have added jobs to a JobRestricted garage, only people with said job(s) will be able to see this blip. It will also display which jobs this location is restricted to on the blip
  • Reworked the job cars garage to use the drawtextui instead of chat commands
  • Reworked the personal owned job vehicles. To make a vehicle a personal owned job vehicle you will need to set the new column in the database 'job_personalowned' to 1. Meaning you no longer need to add all of the personal owned job vehicles to a table in the config
  • Simplified the whole job garage system in the config so it's easier to understand
  • Updated the codesign error handlers
  • Reworked the garage tax system to get the garage tax value from each car from the "vehicles" database table. (make sure to insert the new SQL)
  • Reworked the use of the "vehicles" database table. We now get the vehicle display name, vehicle price, vehicle class and the garage tax amount for each vehicle
  • Updated the impound UI to the new system of getting the vehicle labels from the database if possible so it always shows the vehicles labels instead of the spawn names
  • Moved the webhooks to a server-only file so it can not be dumped from the config
  • When impounding a vehicle, you can now choose to send the ID of the vehicle you wish to impound (so you can impound vehicles which are still on the back of tow trucks)
  • Changed the /vehicle-add command so you can not add a vehicle to the database if it is already owned by a player
  • Changed the /vehicle-delete so it does not log to discord if the vehicle is not owned by a player
Fix
  • Fixed spawn bug with long vehicle loading times
  • Fixed a bug with the adv_stats on some vehicles in the database sometimes being set to false
  • The drawtextui now closes when the pause menu is open and reopens when you close it
  • Fixed a bug with the impound where it always showed the car being in the city impound even tho it could have been in other impounds
  • Fixed return vehicle not showing
  • Fixed unimpounding vehicle bug when Config.AnyoneCanImpound is enabled
  • Fixed /impound UI showing 'undefined'
  • Fixed a potential bug with pressing H (when you have no cars in garage) and then pressing E straight after
  • Fixed an issue with the cooldown on using the garage not working correctly
  • Fixed submarines not being recognised as boats
  • Fixed the job garages showing the ’Garage A’ on the UI as it should say ‘Job Garage’
  • Fixed a bug causing owned job garages to not function correctly
  • Fixed the regular job vehicles not displaying the vehicles label from the database
  • Fixed an issue with searching plates when using the impound UI
  • Fixed not being able to search for plates on the quick vehicle UI when caps lock is enabled
  • Temporary fix for the canary issue until the new Tebex FiveM license system is ready to launch, when this is released we will be fully switching over to the new system
Authentication
  • Authentication update

02/11/2021

Files Changed: