🚗mGarage
mGarage Documentation
------INSTALLATION------
First - Artifact
Update your artifacts from here https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
In order to run this script your artifact should be the latest update or +set sv_enforceGameBuild 2699 this gamebuild. Also onesync has to stay open.
STEP 1 - Drag And Drop
Drag codem-garage into your resources folder.
STEP 2 - Framework Configuration
Select framework you're using options are esx, newqb and oldqb.
STEP 3 - SQL Configuration
Select the sql you're using option are oxmysql, ghmattimysql, mysql-async from config.
STEP 4 - Discord Bot Token ( For Profile Pictures )
Create a discord bot token and paste it to here (this is necessary to get players' discord profile image).
How to create bot token ?
------CONFIGURATION------
Insert SQL
Insert the SQL File to your SQL. Please insert the right one for your framework.
For ESX the part of vehicle price list is in the esx-insert file.
For QB the part of vehicle price list is inside the ""qb-core/shared/vehicle.lua "
If you are using something other framework its must be in the " client/function.lua "
You can edit the down below codes to configure this.
Functional Changes
Options Change
If you want to close " repair, transfer, sell " you can close it via config.
Drawmarker and Drawtext Change
Config.InteractionHandler = "drawtext" -- "qb-target","drawtext","custom" is a custom interaction handler. This is the code for open garages.
qb-target
You can also configure this to your own target system from down below.
Config.InteractionHandler2 = "drawmarker" -- "drawtext", "drawmarker","custom" is a custom interaction handler. This is the code for parking cars to garage.
Drawmarker
Drawtext
Plate Options For Job Garages
You can configure the job garage vehicles plate number from config.
Adjusting Mileage Format
You can adjust the mileage format that displays maximum speed on vehicle specs from config.
KM = KMH
MI = MPH
Adjusting Default Sell Price
You can change the default sell price from config.
If a vehicle doesn't have a sell price it'll automaticly configure itself to default sell price.
Adjusting Fuel System
You can adjust the fuel system from config.
If you are using another fuel system you can adjust it from down below codes.
Adjusting Functions Cost
You can adjust the repair and vale price and money types from config as well.
Adjusting Notification
You can adjust your notification from down below codes from config.
Adjusting Weight For Vehicle Classes
You can change your vehicle weights according to their classes from config.
Adjusting Vehicle Information Text
You can change your vehicle text according to their classes from config.
Adjusting Camera Position
You can change camera position for garages. In order to that follow the steps.
Get the positions where you want your garage camera to be shown.
And get your coordinates.
And paste it with the order of x,y,z.
------HOW TO------
How To Configure Modded or Custom Cars To Garage ?
1.To give your vehicle a name go to " client/vehicle_name.lua " and change the following codes.
'techart17' is the vehicle code, 'Porsche Panemara' is the vehicle name.
2.If you want to add a logo for this vehicle change the following codes.
You need to adjust this from Config.CarLogo. Also be sure that your file format is in the "nui/images/logo" as PNG.
3. If you want to adjust the vehicle preview footage change the following codes.
You can add it from Config.CarImage. Add the png formated file name near to your car name. Also be sure that your preview footage png file is in the "nui/images/cars".
4. If you set eveything correctly you'll get this view on garage.
How to adjust for qb-phone ?
1.Go to "qb-phone/client/main.lua" and find the codes down below.
And change this codes to down below codes.
2.Go to "qb-phone/server/main.lua" and find the codes down below.
And change this codes to down below codes.
3.If your phone is not opening go to "qb-phone/fxmanifest.lua" and delete the '@qb-garages/config.lua'.
If its still not opening go to your database and change the parking column value to " Garage A ".
4.Done!
How To Send Car To Impound
You can use this trigger snippet.
------INFORMATION------
Information About Job Garages
If you are not going to use it for gangs " ["gang"] = "none" " this part has to stay like this.
Information About Job Vehicles
'grade = 0' means that in your job employees that has grade 0 and above that can see that vehicle.
'grade = 2' means that in your job employees that has grade 2 and above that can see that vehicles and thefore 0 and 1 can't see it.
If you want to add new vehicles you can go in the order like 6-7-8 like down below.
Possible Error Informations
If you are getting this error " [Codem] Missing vehicle read documentation: ... " in your vehicles part shown below seen as null therefore script can't reach the vehicles.
If you are getting this error "[^3WARNING^7] Ignoring vehicle ^5%s^7 due to invalid Model ..." your vehicle model is incorrect so it means either there is no vehicle like that or there is something wrong in vehicle handling files.
Preview Video
TEBEX
https://codem.tebex.io/package/5296269
Discord
Last updated