2. Unzip the cd_garage.zip folder and place this folder in your server's resource folder.
3. Add the resource to your server start config (server.cfg): ensure cd_garage. If you are using a framework, it must be placed anywhere below your framework resource e.g., es_extended, not above.
ensure es_extended
ensure cd_garage
Step 1 - Fxmanifest
Depending on your framework and dependencies, you may need to make some changes inside the [cd_garage/fxmanifest.lua]. We have made this easier by commenting on the lines you possibly need to change.
Step 2 - Configure Resource
You MUST read all configurable options inside the [cd_garage/configs/config.lua] file and configure them to suit your server's needs. Please read the ”commentedouthelp 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.
We have added a new feature we are calling 'auto_detect', which will automatically identify your framework and SQL database resource, and apply the appropriate default settings.
Step 3 - SQL Database
Insert Automatically?
If you set Config.AutoInsertSQL in the [cd_garage/configs/config.lua] to true, the resource will automatically insert the SQL for you. You can set this to false after the SQL has been inserted successfully.
Insert Manually?
Alternatively, if you want to insert the SQL queries manually, you can find them here.
Step 4 - Configure Key Binds
Before starting this resource on your main/live server, we highly advise configuring your key binds because this resource uses Fivem's Key Mapping.
Where can I configure my key binds?
You can configure key binds in the Keys and Commands section near the bottom of the [cd_garage/configs/config.lua].
Why do I need to do this?
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 key binds on keyboards or controllers. You can also check out the Default Keybinds for this resource.
Step 5 - Install Dependencies
Where can I find these dependencies?
Open the [cd_garage/dependencies] folder. The folders inside are the required dependencies. You will find a text file inside each folder that includes a GitHub download link. Alternatively, they are listed in the table below.
Where should I put these dependencies?
These resources should be placed in your resources folder like any other, but remember, you shouldn't put them in the cd_garage folder.
Do I need to add them to the server start config?
Required: If a dependency is listed below as required, then no, because it will start automatically due to it being listed as a dependency for this resource.
Optional: If a dependency is listed as optional, then yes, you need to add it to your server.cfg.
OPTIONAL is used by default for vehicle lockpicking if enabled but can be replaced/removed.
Step 6 - Vehicle Keys
Do you use cd_garage’s built-in vehicle key system?
Yes? The keys will automatically be given when you spawn a vehicle from the garage. You should read the information in Vehicle Keys, as you may need to add the cd_garage add key event in other resources that spawn vehicles, such as vehicle shops or your frameworks /car chat command.
Do you use a different vehicle key script?
Yes? By default, we have added compatibility with some, but not all, key resources. If your key resource isn't listed, In the [cd_garage/configs/client_customise_me.lua]file, find the function named [GiveVehicleKeys], and add the event/export from your existing vehicle keys script to give a player keys when a vehicle is spawned from the garage. (See image below).
Do you not use any vehicle key script?
Then you can skip this step.
Step 7 - Vehicle Plate Format
PLEASE READ CAREFULLY!
You must complete this step correctly. You must read the information below and confirm your server's plate format.
Please 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.
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 [configs/config.lua] file to what plate format your server uses. We have added compatibility with all 3 known plate formats.
Short Explanation
By default, every vehicle's 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 vehicle's 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.
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.
Example of what the "trimmed" plate looks like when using DEBUG PRINTS.
Example of what the "trimmed" plate looks like in the DATABASE.
Example of what the "trimmed" plate looks like IN-GAME.
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, 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.
Example of what the "with spaces" plate looks like when using DEBUG PRINTS.
Example of what the "with spaces" plate looks like in the DATABASE.
Example of what the "with spaces" plate looks like IN-GAME.
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 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, 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 what the "mixed" plate looks like when using DEBUG PRINTS.
Example of what the "mixed" plate looks like in the DATABASE.
Example of what the "mixed" plate looks like IN-GAME.
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 are your plates formatted like [ABC 123]?
Use the "mixed" option.
My plates are 8 characters with no spaces [ABCD1234]?
Use the "trimmed" option.
OPTIONAL FEATURES
This section is to help you understand how the built-in features of this resource work and, if applicable, how you can make them compatible with other resources. These features are not required. They are optional and can be configured in the [configs/config.lua].
Vehicles Data (vehicle names)
We will grab this data on ESX 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 to fully configure everything for your server's needs.
Multiple "vehicles" database tables
We were informed 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 to fully configure everything for your server's 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.
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.”
Compatible Code Snippets Provided by Codesign
On our Garage Resource Integration page, we provide photos, customized code snippets, and the exact lines to modify for full compatibility with ESX, QBCore and Paid Resources.
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, 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.
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 trigger this client-side event to automatically update the garage_type in the owned_vehicle/player_vehicles database table.
This event will only work if the player is sitting inside the vehicle when the event is triggered, and you don't need to do this for cars/bikes, as the default value In the database for this column is always ’car’.
Private Garages
How do private garages work?
Private garages function the same way as normal public garages, but they can be placed anywhere using a chat command, and only the player who purchased them can see or use them. In the config.lua you can allow certain jobs, such as real estate, to create and sell these private garages to players.
Property Garages
How does property garages work?
If you use a paid property resource, then the developer of said resource will be best suited to help you with the property garages, as the Codesign Team doesn't have access to their resources. We can't access them without the developer's permission, considering we haven't purchased them. But, we have made it extremely simply for you to implement this into your property resource.
Do you use QBCore?
You don't need to make any changes; this is already pre-configured!
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.
In the config.lua, you can configure the usable item’s spawn name. Stand close to a vehicle you own, use the item, enter the new plate in the text box and the new fake plate will be applied to your vehicle. When you store your car in the garage it will remove the fake plate. You and/or configured jobs such as the police can also use the chat command to remove a fake plate.
Built-in Vehicle Keys Required!
This only comes pre-configured for our built-in keys system. It will not work by default with other key resources unless you trigger an event/export to give keys after a fake plate has been added.
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.
Script Conflicts!
You MUST stop/remove other key scripts if you are using our built-in key system. Always double-check to see if they are stopped because if your keys script is listed as a dependency, it will automatically start even if you removed it from the server start config.
Compatible Code Snippets Provided by Codesign
On our Garage Resource Integration page, we provide photos, customized code snippets, and the exact lines to modify for full compatibility with ESX, QBCore and Paid Resources.
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. Only vehicles spawned through our garage will be persistent by default unless you add more persistent vehicles by using the events below. A vehicle’s last saved position will be set when the vehicle has been sitting still for longer than 5 seconds. Please note that vehicles will not save and respawn after a server restart.
Possible Modifications are Required!
If you use this feature, you must add the event below to remove a persistent vehicle in external resources; for example., in your /dv chat command, in an external impound resource or if the plate changes; otherwise, it will respawn.
Compatible Code Snippets Provided by Codesign
On our Garage Resource Integration page, we provide photos, customized code snippets, and the exact lines to modify for full compatibility with ESX, QBCore and Paid Resources.
This should be triggered when a vehicle is spawned that you want to be persistent. The 1st argument is the vehicle's plate and the 2nd argument is the vehicle's network id.
This should be triggered when a vehicle is spawned that you want to be persistent. The 1st argument is the vehicle's plate and the 2nd argument is the vehicle's network id.
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.
Compatible Code Snippets Provided by Codesign
On our Garage Resource Integration page, we provide photos, customized code snippets, and the exact lines to modify for full compatibility with ESX, QBCore and Paid Resources.
Do you use QBCore?
By default, QBCore uses the regular job garage method. So, unfortunately, we don't have any guides for setting up personal or society garages.
What are regular job vehicles?
These are spawned in vehicles and are not owned by anyone.
Add the vehicles of your choice to the Config.JobVehicles.RegularMethod table in the config. Each job has its own choice of vehicles that players with said job can only use.
What are personal owned job vehicles?
Personal owned job vehicles are vehicles that you have purchased from a vehicle shop and only you can access them from your job garage.
Ideally, this should be set in the same SQL query that adds the vehicle to the database when the vehicle is purchased.
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.
Society owned vehicles will allow all players of the same job to use all of the vehicles their job owns at their job garage.
Ideally, this should be set in the same SQL query that adds the vehicle to the database when the vehicle is purchased.
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.
The difference between job and gang garages is that once a player stored their personal car in a gang garage, anyone in that gang can take it out and use it until the owner puts in back into their personal garage. Other gang members can not store your vehicle in their personal garage.
Do you use ESX?
Gang garages can only be used on Qbcore because gangs on esx are standard jobs. You should use the job garage for gangs on ESX.
Changing Garage Names
If you wish to change the names of the garages from eg., A to Legion you would need to configure the Garage_ID variable in the Config.Locations in the configs/config.lua file. The script will automatically take care of the rest for you regarding the database.
Garage Phone Apps
How do garage phone apps work?
By default, most likely, your phone's garage app wont be compatible with cd_garage, but we provide you with code snippets for compatibility to resolve this problem in our Garage Resource Integration.
Custom vehicle logos
Credits to @Baby Amnesia for making this tutorial.
INFORMATION
Default Key Binds
These keys can be modified and/or disabled in the Keys and Commands section of the [configs/config.lua].
Please make sure you understand how Key Mapping works.
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
These chat commands can be renamed and/or disabled in the Keys and Commands section of the [configs/config.lua].
The exact usage for each command will be displayed in the chat suggestions when using the commands in-game.
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
Start lockpicking the closest vehicle.
Events
These events are completely optional; you can use them if needed.
Mileage
Check a vehicle's mileage.
TriggerEvent('cd_garage:checkmileage')
Impound Vehicle
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.
Update the database with the correct garage_type for the vehicle a player is sat in.
TriggerEvent('cd_garage:UpdateGarageType')
Impound Vehicle Directly Through code
This event allows you to send vehicle's to the impound directly through code, without needing the in-game UI.
TriggerEvent('cd_garage:ImpoundVehicle:Direct', { plate = plate, -- string, the vehicle's plate. impound = impound, -- number, the ImpoundID from the Config.ImpoundLocations. props = props, -- table, the vehicles props. time = time, -- number, the time the vehicle was impounded. description = description, -- string, the description of why the vehicle was impounded. canretrive = canretrive, -- boolean, if the vehicle can be retrieved from the impound by the owner. vehicle = vehicle, -- number, the vehicle entity.})
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.
This event allows you to send vehicle's to the impound directly through code, without needing the in-game UI.
TriggerClientEvent('cd_garage:ImpoundVehicle:Direct', source, { plate = plate, -- string, the vehicle's plate. impound = impound, -- number, the ImpoundID from the Config.ImpoundLocations. props = props, -- table, the vehicles props. time = time, -- number, the time the vehicle was impounded. description = description, -- string, the description of why the vehicle was impounded. canretrive = canretrive, -- boolean, if the vehicle can be retrieved from the impound by the owner. vehicle = vehicle, -- number, the vehicle entity.})
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.
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 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).
🔔 Folder Name Make sure the name of the folder is cd_garage.
🔔 Encrypted Files Do not edit the encrypted files in any way.
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.
Is the impound Not Opening?
eg., if you see a thin line on screen where the impound UI should be and you see a client F8 print saying "toLowerCase".
✔️ Part 1: Use this chat command in your server console before any player joins.
cd_garage_jobvehicles
✔️ Part 2: Execute this SQL query in your database.
UPDATE owned_vehicles SET impound = 0, impound_data = '' WHERE impound > 0
'L' client-side F8 Error?
eg., if you see an error in the client-side F8 console similar to this example - attempt to call a number value (field 'L') - example.
✔️ This is caused by your anti-cheat. The creator of the anti-cheat most likely has a line of code that you can to add to the [cd_garage/fxmanifest.lua]. This should whitelist this resource and fix the issue.
Fuel Not Saving Correctly?
eg., if your vehicles fuel is not saving when you store a vehicle or not applying when spawning a vehicle in the garage.
✔️ This is because the GetFuel() and SetFuel() functions in the [configs/client_customise_me.lua] resource has not been configured for your servers vehicle fuel resource.
RGB Colours Not Saving Correctly?
eg., if your vehicles RGB colours are not saving when you store a vehicle or not applying when spawning a vehicle in the garage.
✔️ This is because you have not made the changes to your frameworks GetVehicleProperties() and SetVehicleProperties() functions that your mechanic/customs resource requires you to do.
"ExitLocation" client-side F8 error?
eg., if you see an error in the client-side F8 console similar to this example - attempt to call a nil value (field 'ExitLocation').
✔️ This happens when you spam the button on the UI to spawn a vehicle too fast, it does not break anything and can be ignored.
ERROR CODES
If you see an error code not listed below, please open a script support ticket in the Codesign Discord.
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.
5111- This error code is displayed when Config.UseExploitProtection is disabled as a warning. This most likely means the model variable inside the vehicle/mods column in the owned_vehicles/player_vehicles database table a player's vehicle is missing. This is due to your vehicle shops not working correctly. The easiest fix is to delete this vehicle from your database or manually add the plate inside this JSON file. But it can also mean a player is actally using a cheat engine on your server.
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 / 749864- 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 plate variable inside the vehicle/mods column in the owned_vehicles/player_vehicles database table for one of this player's vehicles is missing. The easiest fix is to delete this vehicle from your database or manually add the plate inside this JSON file.
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.
68541545 - You are trying to use a regular job garage, but you have not added any vehicles for that job to the Config.JobVehicles.RegularMethod section of the job garage config.
68445154 - There is an error in the SpawnVehicle function in the client/main/functions.lua.
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.
All Files Except config.lua - This means you should do all of the above (in the All Files section) but additionally make a backup of the config.lua file and replace the new config.lua file with the one you made a backup of.
Specific Files - This means you can 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.
Skipping Updates
If you are attempting to update to the latest version but have skipped previous updates, you should update all files just to be safe. For example., let's say you are currently on v4.0.1, you did not update when v4.0.2 was released, and now v4.0.3 is released, and you want to update; you should always use the “All Files” update method.
26/12/2020 - 21/06/2021
v3.0.0 - v3.0.7
Files Changed:
Update Type:
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:
Update Type:
Changelog:
Authentication
We are now using the official Authentication System provided by FiveM. The old auth system will be taken offline 1 week from now (give or take a few days if needed).
Add
Added a config option to disable the garage exploit protection
Added a 3rd key press when using the garage to store trailers, (G by default) which will store either the vehicle you are in or the closest vehicle. This will enable the use of trailers as you can store them now.
Added a new config option which will make players to pay a configurable percentage fee of the vehicles price to return vehicles using the outside quick UI. (or you can still use a configurable set price)
Added a function in the client_customise_me that is triggered after spawning a vehicle, making it easier for people to understand where they can add extra trigger events.
Added a fake plate system. You can add a fake plate by using an item and it will open a UI where you can input text to choose your own plate. The fake plate can be reverted by using a chat command or by storing the vehicle.
Added a private garage system, which wil allow specified jobs to create private garages anywhere on the map and sell them to players. The private garage will be placed at the coords and heading where the player is who created it.
Reworked the impound, now when you impound a car you will have a new UI where can input the reason, officers name, and impound duration or set it so only a officer can un-impound the vehicle. With this new system officers can impound vehicles for a set amount of time, and when this time expires the owner of the vehicle can retrieve the vehicle themselves after paying the fee calculated by the vehicles price.
Added a new garage transfer option to the quick garage UI to transfer to another garage for a configurable fee.
Added drag-and-drop compatibility with the QBCore framework.
Added support for oxmysql.
Added support for our new 40 car garage shell. This includes the new option to choose a shell for each garage location or allow the script to choose a shell for a player depending on how many vehicles a player owns.
Added vehicle keys which allow players to give temporary and saved keys, along with a UI to remove keys you have given to players. Temporary keys get removed after a server restart and saved keys save in the database and give them back to the players when they login.
Added a new config option which will allow you to set the garage to work with vehicles with no spaces in the plate and with spaces in the plate. So with this simple config option you no longer need to edit external scripts to work with the garage regarding the plates.
Added a new action bar for use when hotwiring vehicles.
Edit
Added a check to prevent the transfer vehicle chat command from being used without sending the players id in the first argument.
Cleaned up some of the code in the functions.lua.
Edited the personal owned job vehicle system., so for example if you purchase a personal owned police car for your job, you can only access this police car when you have the police job. Meaning if you leave the police to be a mechanic you will no longer have access to spawn the police car from the mechanic job garage.
Reworked the "inside garage blacklist", so instead of text appearing where your blacklisted vehicle should have been, it will now just place the next vehicle in its place.
Removed the garage_tax database column in the users database table as it is no longer needed, we will now cache the data server side instead.
The vehicle plate has been added to the main quick garage UI in replacement for the vehicle's category.
The inside garage is more responsive, while being more optimised.
Fix
Fixed an typo in the provided vehicles SQL table
Fixed the impound so unowned vehicles do not actually get added the impound when using /impound.
Fixed the 2 different types of liveries both not saving in the esx/qbcore props
Fixed the bug where on random occasions you could spawn a car that's already out on the streets when using onesync.
Fixed some vehicle damages not saving and reapplying.
When you store a boat in the garage it will now teleport you out of the water and onto solid ground.
All known bugs fixed from previous versions and from beta testing.
Added config option to use the QBCore time/weather sync resource.
Added a new event to force save the damage of every owned vehicle to the database so players can't escape vehicle repair costs by leaving the vehicle on the street before a server restart. This will only work if Config.VehicleKeys.ENABLE is set to true.
Added compatibility for qb-houses with the property garages. (these property garages are not unique at this time, meaning vehicles stored in a property garage can be spawned from any property garage).
Added the players job label instead of the name to the job garage UI.
Added some more locales for the UI to the locales_ui.js.
Edit
Edited the vehicle management command permissions to be more user friendly with pre configured permissions for each framework.
Reworked the garage tax system. The garage_tax column from the database has been removed. Now vehicles either get taxed based on a % of a vehicle price or a set configurable fee.
Reworked the vehicle keys system so you can enable the vehicle lock system while disabling the vehicle hotwire system. They now both work independently.
Updated compatibility with the new oxmysql method.
Disabled some features by default to ensure easier installation for newer developers.
Fix
Fixed the data not being pulled correctly from the QBCore shared vehicles when Config.VehiclesData is enabled.
Fixed some bugs with the fakeplate.
Fixed some locales on the UI not being translatable.
Fixed a bug where the closest vehicle checks sometimes don't get the correct vehicle.
Fixed the errors with the server event to save all mileage.
Fixed a typo which caused the server side garage space file to not load.
Fixed the avisa submarine not being storable in boat garages.
Fixed the GetGarageCount and GetGarageLimitfunctions not functioning correctly on QBCore servers.
Fixed the vehicle management command and garage space command not functioning correctly on QBCore servers.
Fixed random client framework error caused by framework not being initialized fast enough.
Fixed typo in /vehicle-plate command that caused an error.
Fixed an issue with esx trimming plates even with Config.VehicleDatabasePlateType enabled.
Optimised the job checks.
Fixed the hotwire action bar randomly starting at different stages.
Fixed the wrong data being added to the database when using the /vehicle-add command on QBCore.
Added extra checks to fix vehicle props if certain values are missing/nil/NaN.
Fixed an issue with the closest vehicle checks returning the wrong vehicle.
Fixed the heading for private garages.
Fixed a typo in the provided SQL file.
Fixed an error when using the QBCore property garage that occurred when a property did not have the coords set.
Fixed the issue where players could spawn their vehicles from other players property garage.
Fixed QBCore perms.
01/08/2022
Files Changed:
Update Type:
Changelog:
Add
Added gang garages. This is drag and drop on QBCore but it's very easy to add compatibility with any other gang resource.
Added a config option to disable the inside garage without needing to make any other changes.
Added on-duty checks alongside the job checks.
Added a new config option to allow certain jobs to remove fake plates.
READDED the Config.PlateFormat config option to allow the use of plates with spaces.
Added a vehicle lockpick system for unlocking locked owned vehicles.
Added a 3rd argument to the server customise me's check and remove money functions to allow you to add the money from impound fees to police society for example.
Added a config option to disable the return vehicle feature.
Added a new chat command to delete private garages.
Added checks to warn you if one of your vehicles in qbcores shared vehicle table has been formatted incorrectly.
Fix
Fixed a bug with blacklisting vehicles in the inside garage.
Fixed an issue with 1 locale for cd_drawtextui being encrypted causing issues using other draw text resources.
Fixed the cd_drawtextui from not updating instantly when spawning a vehicle from the job garage.
Fixed a typo in the SQL file.
Added extra checks to warn you when there is issues with your vehicle props data caused by other scripts adding incorrect data to it.
Fixed a typo in the vehicle lock system possibly causing issues.
When a car is unimpounded the in_garage state gets set back to 1 so the player doesn't have to pay a return vehicle fee.
Fixed a typo with the garage tax amount being $0 when using the default price calculator method.
22/10/2022
Files Changed:
Update Type:
Changelog:
Edit
Added extra code to auto-fix errors caused by the wrong formatting of QBCore's shared vehicle file.
Added some code for the Config.DebugPrints option to help debug framework-related issues.
Fix
Fixed an error with the save all vehicle damage events.
Fixed an issue with lockpicking vehicles.
Fixed an issue with saved vehicle keys.
Fixed a bug where it would error when trying to transfer a vehicle when you only have 1 garage location configured.
Fixed cars being able to move when hotwiring.
29/01/2023
Files Changed:
Update Type:
Changelog:
Add
Added a built-in persistent vehicle feature.
Added a new config option (Config.UseFrameworkDutySystem) for you to decide whether you want to use your framework's on/off duty feature.
Edit
Updated the locales.
Removed unnecessary dependencies.
Added event handlers for the default QBCore qb-keys (meaning you no longer need to edit the give-key events in your QBCore resources).
Moved some code from the functions.lua into new files to improve organisation.
Improved the debug prints.
Replaced the database queries to get a character's name with xplayer.getName().
Fix
Made changes to the garage to auto-fix the 013552 error code caused by other resources not adding the data to the mods column in the database.
Fixed the inside garage blacklist.
Fixed issues with radial menus sending the wrong data for the impound event.
Fixed an issue with the regular job spawn plates which caused keys to not be given.
Fixed the impound timer to save to the database when the timer reaches 0 to avoid timers being reset after a server restart if the player has not retrieved their vehicle.
01/02/2023
Files Changed:
Update Type:
Changelog:
Edit
Improved the persistent vehicles logic.
Updated the vehicle keys code to be more stable and consistent.
Removed the long cooldown timer with vehicle keys when locking/unlocking vehicles.
Backend code optimization improvements.
Fix
Fixed issues related to the error code 2246.
Fixed the DeleteGarage errors.
Fixed the issues with fake plates and persistent vehicles.
10/02/2023
Files Changed:
Update Type:
Changelog:
Add
Auto Framework Detection - We have added a new feature we are calling 'auto_detect', which will automatically identify your framework, SQL database resource, and framework notifications and apply the appropriate default settings.
Auto SQL Insert - If you set Config.AutoInsertSQL in [configs/config.lua] to true, the resource will automatically insert the SQL for you. You can set this to false after the SQL has been inserted.
Added the GiveVehicleKeys function in the client customise, which is triggered every time the script needs to give vehicle keys to a player. You can put your external give key events/exports here.
Edit
Removed some old default notification types.
Reverted the change to allow vehicles to be driven without keys when hotwire was disabled.
Fix
Fixed all known issues with persistent vehicles.
Fixed issues when storing vehicles with an empty mods column on qbcore.
Fixed a typo that caused you to fall through the ground when spawning a car inside the garage.
Fixed an abusable bug to avoid hotwiring vehicles.
Fixed the "no NUI callback captured" warning.
Fixed the wrong return vehicle fee being displayed on the inside garage UI sometimes.
Added extra checks to the impound event for when you are using radial menus, and they send the incorrect data.
Fixed a typo with the check vehicle on streets callback, allowing duplicate vehicles.
21/02/2023
Files Changed:
Update Type:
Changelog:
Add
Added more locales.
Added car alarms when hotwiring and lockpicking vehicles.
When changing the garage names, the script will automatically update the default garage_id in the database and the garage_id for all vehicles in the database.
Edit
Updated the "cd_garage:UpdateGarageType" event to ensure the vehicle is added to the correct default garage for boat or air vehicles.
Cleaned up and organised the open files.
Fix
Fixed a server-side error on qb when storing a vehicle in the gang garage or trying to store a vehicle you don't own.
Fixed the regular job garage vehicle deleter from deleting vehicles far away.
Fixed being able to duplicate vehicles from impounds if you tried to impound a vehicle when a player was still sitting inside.
Fixed the esx depreciated event warning.
Fix for some mechanic scripts saving the model as the vehicle spawn name instead of the model hash.
Fix for some auto SQL insert errors when first installing the resource.
02/05/2023
Files Changed:
Update Type:
Changelog:
Add
Shared Vehicles Added a new feature allowing you to share your vehicle with others if you give them a saved key. They can spawn your vehicle from your garage even if you are offline. Their access is removed when you remove their saved key. It can be disabled in the config.
Job Garage Shared Keys Added a new feature which allows keys for vehicles spawned through the job garage to be shared with other players of the same job. It can be disabled in the config.
Lockpicking Item Lockpicking vehicles can now be done using a usable item or a chat command.
Impound Vehicle Event Added a new event allowing you to impound a vehicle directly from an event from external scripts.
Added an animation when lockpicking a vehicle.
Added pre-configured compatible code for 3 different notification scripts.
Added pre-configured compatible code for 10 different fuel scripts.
Added pre-configured compatible code for 5 different vehicle key scripts.
(more pre-configured compatibility will be added for scripts with public docs or if their authors contact us.)
Added pre-configured compatibility with AdvancedParking and new functions to the client_customise_me.lua for easier compatibility with other persistent vehicle scripts.
Regular job vehicles now spawn with max fuel.
Edit
Added a function to the server_customise_me.lua which is triggered when a fake plate is added/removed, allowing you easier compatibility with external scripts.
Further organised different parts of the code and moved them into their own files.
Removed the "Config.DisableOwnership" option.
If the return vehicle feature is disabled, the button is not hidden.
Fix
Fixed the return vehicle feature not working when the return price is set to 0.
Fixed an error with the auto-insert SQL on fresh installs.
Implemented a permanent fix for the 5111 error code.
Fixed an issue with persistent vehicles when using the /vehicle-plate admin command.
Fixed the "JobRestrictNotif" client-side error.
Fixed the impound UI's "impound time" default value disappearing when closing and reopening the UI.
Fixed the impound UI's character count from not resetting when closing and reopening the UI.
04/06/2023
Files Changed:
fxmanifest.lua
server/main/version_check.lua
configs/server_customise_me.lua
configs/client_customise_me.lua
server/other/keys.lua
html (full folder)
Update Type:
Changelog:
Add
Added pre-configured compatibility with lb-phone for garage tax.