Unzip t1ger_tuningsystem.zip folder and place it into your resource folder. You can place it in a sub-folder as well.
Add ensure t1ger_tuningsystem to your server start config. Make sure to ensure it after all the dependencies!
Example of my startup order in server.cfg
4 - SQL
Open the main.sql file and execute the queries into your database (you can also import the SQL file directly into your database).
5 - Items
If you rename items or use your own items, make sure to update inside t1ger_tuningsystem/shared/config.lua with the respective item names, otherwise the script might not function.
ESX
Open your database and find the items table.
Run this query in your database to insert the items.
QBCore
Navigate to qb-core/shared/items.lua and open up the file.
Insert the following items into the file:
Please note, if you already have T1GER Mechanic System installed, skip the materials as they are already added.
OX Inventory
Navigate to ox_inventory/data/items.lua.
Insert the following items into the file:
Please note, if you already have T1GER Mechanic System installed, skip the materials as they are already added.
Inventory item icons/images can be found in the resource folder or download them directly here:
The resource features automatic job creation in runtime when creating new shops.
ESX
With recent ESX updates, you may need to navigate to es_extended/server/modules/createJob.lua and replace ESX.CreateJob() with the function below.
If you don't have that folder/file, then navigate to es_extended/server/functions.lua and find the following function:
If you cannot find the function, do not worry. You can either update your es_extended to latest version or insert the following function in the bottom of the file:
If you already have such function, make sure the function looks exactly like this. If not, then replace the function you have with this.
QBCore
If you are on qb-core framework you don't need to alter any functions.
However, your 3rd party resources (phones, doorlocks, huds etc.), might not recognize the newly created job or not sync properly.
This happens because those 3rd party resources does not fetch the added jobs, the updated core, and sync it with their resource. For the records, we are using the official qb-coreAddJob export, so it's totally out of our hands (maybe you can push/encourage them to add support for jobs created in runtime using the export).
Creators of said resources might not put time in to add compatibility for the export by qb-core, so here's a temporary workaround you can utilize:
Navigate to qb-core/shared/jobs.lua.
Insert the job you want to use (or the job you already created in-game) and that's it.
Example:
Here's an example for a tuner job, called t1gertuner.
It's very important that the job name ('t1gertuner') matches the field in the menu. Also make sure the very last grade you have, has the isboss = true parameter.
When using the Shop Creator, it will auto-fetch the job label and job grades based on the job name you enter, so this way you can pre-configure some jobs in your shared/jobs.lua and use these.
The In-game in the shop-creator for this particular job, should look like this:
Where:
Shop Name: is a user-defined name for the shop.
Job Name: is the job name (lower char, no spaces and no special chars).
Job Label: is the displayed label of the job.
Now, the resource will automatically fetch the stored data for this job.
7 - Saving Vehicle Mods
All vehicle mods are saved using vehicle properties and in order to sync properly with your 3rd party resources you need to make two simple changes. Refer to Vehicle Properties and follow the Setup instructions.
8 - Configuration
Language
Navigate to t1ger_tuningsystem/shared/language.lua to customize all strings to translate them into your preferred language.
--- Create Job at Runtime
--- @param name string
--- @param label string
--- @param grades table
function ESX.CreateJob(name, label, grades)
if not name then
return print('[^3WARNING^7] missing argument `name(string)` while creating a job')
end
if not label then
return print('[^3WARNING^7] missing argument `label(string)` while creating a job')
end
if not grades or not next(grades) then
return print('[^3WARNING^7] missing argument `grades(table)` while creating a job!')
end
local parameters = {}
local job = { name = name, label = label, grades = {} }
for _, v in pairs(grades) do
job.grades[tostring(v.grade)] = { job_name = name, grade = v.grade, name = v.name, label = v.label, salary = v.salary, skin_male = v.skin_male or '{}', skin_female = v.skin_female or '{}' }
parameters[#parameters + 1] = { name, v.grade, v.name, v.label, v.salary, v.skin_male or '{}', v.skin_female or '{}'}
end
MySQL.insert('INSERT IGNORE INTO jobs (name, label) VALUES (?, ?)', { name, label })
MySQL.prepare('INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES (?, ?, ?, ?, ?, ?, ?)', parameters)
ESX.Jobs[name] = job
end