Installation & Configuration
Installation
Unzip the
jg-mechanic-bundle
Drag all 4 folders (
jg-mechanic
,jg-mechanic-props
,jg-vehiclemileage
andjg-textui
) into a new folder called[jg]
within your server'sresources
folder.
If you don't plan on using our new default Text UI, you don't need to transfer it to your server, and you can choose a different Text UI script in the config!
Inside of your
server.cfg
, add a new line after all your other resources have started:
Now head into the
install
folder withinjg-mechanic
. In here were are going to modify your database & setup your inventory. Start by running thedatabase/run.sql
file within your database software (could be phpmyadmin or HeidiSQL).
Make sure you are running this SQL code within the correct database - triple check and cross reference the name of the database!
Now navigate into the
inventory
folder. You will need to follow a different guide depending on your chosen inventory. The item images can be found in theimages
folder.ox_inventory
qb-inventory
esx_inventory
Saving Vehicle Modifications
Using JG Advanced Garages? Skip this section, you're good to go, all vehicle modifications will be saved automatically with no configuration required if using v2.2.8 or newer!
JG Mechanic uses your "vehicle properties" to save changes made your vehicle while using the script. Vehicle properties are typically stored in your player owned vehicles database table table, under a column such as mods
or vehicle
.
To make things simple we have created 2 replacement exports for getting and setting these vehicle properties. If using QBCore or ESX, we can replace them in your core to keep things simple.
Configuration
Now for the fun part! Let's get the script perfectly configured for your city. Inside of the config
folder you will find 4 different configuration files.
The main one you want to worry about is the config.lua
file. This is the core configuration for the script. In there you will to make sure you're targeting your framework (QBCore
or ESX
), your inventory script, text UI, notify and more. You can also customise core parts of how the script work, such as mechanic locations, core pricing, servicing, tuning etc.
If you want to dive deeper and really customise the script to your servers specific needs, we have 3 other config files for you to play with. It will allow you to fine tune how mods (tuning), servicing & tuning (engine swaps, brakes, tyres, etc) work in your city. These files are heavily commented to help you understand them. They can be a little complicated, so only modify them if you know what you're doing and somewhat comfortable with Lua.
Last updated