Unzip t1ger_tuningsystem.zip folder and place it into your resource folder.
Add ensure t1ger_tuningsystem to your server start config. Make sure to place anywhere below the framework and dependencies resources.
2 - SQL
Please open main.sql and execute the queries into your database or import the SQL file directly into your database.
3 - Jobs (ESX Framework)
SKIP IF USING QB-CORE FRAMEWORK
Navigate to es_extended/server/functions.lua and paste the below function in the bottom of the file.
With recent updates in es_extended, this function is already added, so please only insert the function if it doesn't exist in your file.
functionESX.CreateJob(name,label,grades)ifnot name thenreturnprint('[^3WARNING^7] missing argument `name(string)` while creating a job')endifnot label thenreturnprint('[^3WARNING^7] missing argument `label(string)` while creating a job')endifnot grades ornotnext(grades) thenreturnprint('[^3WARNING^7] missing argument `grades(table)` while creating a job!')endlocal parameters = {}local job = { name = name, label = label, grades = {} }for _, v inpairs(grades) do job.grades[tostring(v.grade)] = { job_name = name, grade = v.grade, name = v.name, label = v.label, salary = v.salary, skin_male = {}, skin_female = {} }
parameters[#parameters +1] = { name, v.grade, v.name, v.label, v.salary }end MySQL.insert('INSERT IGNORE INTO jobs (name, label) VALUES (?, ?)', { name, label }) MySQL.prepare('INSERT INTO job_grades (job_name, grade, name, label, salary) VALUES (?, ?, ?, ?, ?)', parameters) ESX.Jobs[name] = jobend
Make sure to add this function below ESX.CreateJob function, which will ensure your job is deleted when a mechanic shop is deleted.
functionESX.DeleteJob(name)--- @param name stringifnot name thenreturnprint('[^3WARNING^7] missing argument `name(string)` while deleting a job')end MySQL.update('DELETE FROM jobs WHERE name = ?', {name}) MySQL.update('DELETE FROM job_grades WHERE job_name = ?', {name}) ESX.Jobs[name] =nilend
4 - Items
If you change item names or already have some items you want to use, make sure to update t1ger_tuningsystem/config.lua with the respective item names, so that the resource knows what items to use.
If you already have the items below or have similar items, you can skip the installation for items, just make sure to update config.lua with your item names.
ESX
Open your database and find the items table.
Run the following query to insert items into your table: