Installation
Resource installation guide and dependencies
1 - Ensure Dependencies
Make sure T1GER Library is installed and the required dependencies are ensured. Please refer to Installation.
2 - Get T1GER Tuning System
Get the
t1ger_tuningsystem
resource from: https://store.t1ger.net/package/6044615Download from: FiveM's Keymaster.
3 - Ensure T1GER Tuning System
Unzip
t1ger_tuningsystem.zip
folder and place it into yourresource
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!
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).
DROP TABLE IF EXISTS `t1ger_tunershops`;
CREATE TABLE `t1ger_tunershops` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NOT NULL,
`account` INT(11) NOT NULL DEFAULT 0,
`boss` VARCHAR(100) DEFAULT NULL,
`laborfee` INT(11) NOT NULL DEFAULT 0,
`job` LONGTEXT NOT NULL DEFAULT ('[]'),
`blip` LONGTEXT NOT NULL DEFAULT ('[]'),
`employees` LONGTEXT NOT NULL DEFAULT ('[]'),
`markers` LONGTEXT NOT NULL DEFAULT ('[]'),
`categories` LONGTEXT NOT NULL DEFAULT ('[]'),
`storage` LONGTEXT NOT NULL DEFAULT ('[]'),
`billing` LONGTEXT NOT NULL DEFAULT ('[]'),
PRIMARY KEY (`id`)
);
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.
INSERT IGNORE INTO `items` (`name`, `label`) VALUES
-- Mods
('mod_respray', 'Respray'),
('mod_bodyworks', 'Body Works'),
('mod_chassis', 'Chassis Upgrades'),
('mod_enginebay', 'Engine Bay Upgrades'),
('mod_exterior', 'Exterior Cosmetics'),
('mod_interior', 'Interior Cosmetics'),
('mod_lights', 'Vehicle Lights'),
('mod_wheels', 'Wheels'),
('mod_engine', 'Engine Upg. Kit'),
('mod_brakes', 'Brakes Upg. Kit'),
('mod_transmission', 'Transmission Upg. Kit'),
('mod_suspension', 'Suspension Upg. Kit'),
('mod_armor', 'Armor Upg. Kit'),
('mod_turbo', 'Turbo Upg. Kit'),
-- Kits
('tunertablet', 'Tuner Tablet'),
('tuner_repairkit', 'Tuner Repair Kit'),
-- Materials:
('scrap_metal', 'Scrap Metal'),
('steel', 'Steel'),
('aluminium', 'Aluminium'),
('plastic', 'Plastic'),
('rubber', 'Rubber'),
('electric_scrap', 'Electric Scrap'),
('glass', 'Glass'),
('copper', 'Copper'),
('carbon_fiber', 'Carbon Fiber'),
('brass', 'Brass'),
('synthetic_oil', 'Synthetic Oil'),
('acid', 'Synthetic Acid')
;
QBCore
Navigate to
qb-core/shared/items.lua
and open up the file.Insert the following items into the file:
-- Mods | T1GER Tuning System
['mod_armor'] = {['name'] = 'mod_armor', ['label'] = 'Armor Upg. Kit', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_armor.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Armor Upgrade Kit'},
['mod_bodyworks'] = {['name'] = 'mod_bodyworks', ['label'] = 'Body Works', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_bodyworks.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Body Works'},
['mod_brakes'] = {['name'] = 'mod_brakes', ['label'] = 'Brakes Upg. Kit', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_brakes.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Brake Upgrade Kit'},
['mod_chassis'] = {['name'] = 'mod_chassis', ['label'] = 'Chassis Upgrades', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_chassis.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Chassis Upgrades'},
['mod_engine'] = {['name'] = 'mod_engine', ['label'] = 'Engine Upg. Kit', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_engine.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Engine Upgrade Kit'},
['mod_enginebay'] = {['name'] = 'mod_enginebay', ['label'] = 'Engine Bay Upgrades', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_enginebay.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Engine Bay Upgrades'},
['mod_exterior'] = {['name'] = 'mod_exterior', ['label'] = 'Exterior Cosmetics', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_exterior.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Exterior Cosmetics'},
['mod_interior'] = {['name'] = 'mod_interior', ['label'] = 'Interior Cosmetics', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_interior.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Interior Cosmetics'},
['mod_lights'] = {['name'] = 'mod_lights', ['label'] = 'Vehicle Lights', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_lights.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Vehicle Lights'},
['mod_respray'] = {['name'] = 'mod_respray', ['label'] = 'Respray', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_respray.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Respray'},
['mod_suspension'] = {['name'] = 'mod_suspension', ['label'] = 'Suspension Upg. Kit', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_suspension.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Suspension Upgrade Kit'},
['mod_transmission'] = {['name'] = 'mod_transmission', ['label'] = 'Transmission Upg. Kit',['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_transmission.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Transmission Upgrade Kit'},
['mod_turbo'] = {['name'] = 'mod_turbo', ['label'] = 'Turbo Upg. Kit', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_turbo.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Turbo Upgrade Kit'},
['mod_wheels'] = {['name'] = 'mod_wheels', ['label'] = 'Wheels', ['weight'] = 1, ['type'] = 'item', ['image'] = 'mod_wheels.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Wheels'},
-- Kits | T1GER Tuning System
['tunertablet'] = {['name'] = 'tunertablet', ['label'] = 'Tuner Tablet', ['weight'] = 1, ['type'] = 'item', ['image'] = 'tunertablet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Tuner Tablet used by tuners'},
['tuner_repairkit'] = {['name'] = 'tuner_repairkit', ['label'] = 'Tuner Repair Kit', ['weight'] = 1, ['type'] = 'item', ['image'] = 'tuner_repairkit.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Repair Kit used by tuners'},
-- Materials | T1GER Tuning System
['scrap_metal'] = {['name'] = 'scrap_metal', ['label'] = 'Scrap Metal', ['weight'] = 1, ['type'] = 'item', ['image'] = 'scrap_metal.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Scrap Metal'},
['steel'] = {['name'] = 'steel', ['label'] = 'Steel', ['weight'] = 1, ['type'] = 'item', ['image'] = 'steel.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Steel'},
['aluminium'] = {['name'] = 'aluminium', ['label'] = 'Aluminium', ['weight'] = 1, ['type'] = 'item', ['image'] = 'aluminium.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Aluminium'},
['plastic'] = {['name'] = 'plastic', ['label'] = 'Plastic', ['weight'] = 1, ['type'] = 'item', ['image'] = 'plastic.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Plastic'},
['rubber'] = {['name'] = 'rubber', ['label'] = 'Rubber', ['weight'] = 1, ['type'] = 'item', ['image'] = 'rubber.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Rubber'},
['electric_scrap'] = {['name'] = 'electric_scrap', ['label'] = 'Electric Scrap', ['weight'] = 1, ['type'] = 'item', ['image'] = 'electric_scrap.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Electric Scrap'},
['glass'] = {['name'] = 'glass', ['label'] = 'Glass', ['weight'] = 1, ['type'] = 'item', ['image'] = 'glass.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Glass'},
['copper'] = {['name'] = 'copper', ['label'] = 'Copper', ['weight'] = 1, ['type'] = 'item', ['image'] = 'copper.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Copper'},
['carbon_fiber'] = {['name'] = 'carbon_fiber', ['label'] = 'Carbon Fiber', ['weight'] = 1, ['type'] = 'item', ['image'] = 'carbon_fiber.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Carbon Fiber'},
['brass'] = {['name'] = 'brass', ['label'] = 'Brass', ['weight'] = 1, ['type'] = 'item', ['image'] = 'brass.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Brass'},
['synthetic_oil'] = {['name'] = 'synthetic_oil', ['label'] = 'Synthetic Oil', ['weight'] = 1, ['type'] = 'item', ['image'] = 'synthetic_oil.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Synthetic Oil'},
['acid'] = {['name'] = 'acid', ['label'] = 'Synthetic Acid', ['weight'] = 1, ['type'] = 'item', ['image'] = 'acid.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Material - Synthetic Acid'},
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:
-- Mods | T1GER Tuning System
["mod_armor"] = {
label = "Armor Upg. Kit",
weight = 1,
stack = true,
close = true,
},
["mod_bodyworks"] = {
label = "Body Works",
weight = 1,
stack = true,
close = true,
},
["mod_brakes"] = {
label = "Brakes Upg. Kit",
weight = 1,
stack = true,
close = true,
},
["mod_chassis"] = {
label = "Chassis Upgrades",
weight = 1,
stack = true,
close = true,
},
["mod_engine"] = {
label = "Engine Upg. Kit",
weight = 1,
stack = true,
close = true,
},
["mod_enginebay"] = {
label = "Engine Bay Upgradess",
weight = 1,
stack = true,
close = true,
},
["mod_exterior"] = {
label = "Exterior Cosmetics",
weight = 1,
stack = true,
close = true,
},
["mod_interior"] = {
label = "Interior Cosmetics",
weight = 1,
stack = true,
close = true,
},
["mod_lights"] = {
label = "Vehicle Lights",
weight = 1,
stack = true,
close = true,
},
["mod_respray"] = {
label = "Respray",
weight = 1,
stack = true,
close = true,
},
["mod_suspension"] = {
label = "Suspension Upg. Kit",
weight = 1,
stack = true,
close = true,
},
["mod_transmission"] = {
label = "Transmission Upg. Kit",
weight = 1,
stack = true,
close = true,
},
["mod_turbo"] = {
label = "Turbo Upg. Kit",
weight = 1,
stack = true,
close = true,
},
["mod_wheels"] = {
label = "Wheels",
weight = 1,
stack = true,
close = true,
},
-- Kits | T1GER Tuning System
["tunertablet"] = {
label = "Tuner Tablet",
weight = 1,
stack = true,
close = true,
},
["tuner_repairkit"] = {
label = "Tuner Repair Kit",
weight = 1,
stack = true,
close = true,
},
-- Materials | T1GER Tuning System
['scrapmetal'] = {
label = 'Scrap Metal',
weight = 1,
stack = true,
close = true,
},
["steel"] = {
label = "Steel",
weight = 1,
stack = true,
close = true,
},
["aluminium"] = {
label = "Aluminium",
weight = 1,
stack = true,
close = true,
},
["plastic"] = {
label = "Plastic",
weight = 1,
stack = true,
close = true,
},
["rubber"] = {
label = "Rubber",
weight = 1,
stack = true,
close = true,
},
["electric_scrap"] = {
label = "Electric Scrap",
weight = 1,
stack = true,
close = true,
},
["glass"] = {
label = "Glass",
weight = 1,
stack = true,
close = true,
},
["copper"] = {
label = "Copper",
weight = 1,
stack = true,
close = true,
},
["carbon_fiber"] = {
label = "Carbon Fiber",
weight = 1,
stack = true,
close = true,
},
["brass"] = {
label = "Brass",
weight = 1,
stack = true,
close = true,
},
["synthetic_oil"] = {
label = "Synthetic Oil",
weight = 1,
stack = true,
close = true,
},
["acid"] = {
label = "Synthetic Acid",
weight = 1,
stack = true,
close = true,
},
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 here: Inventory Icons
6 - (Automatic) Job Creation
The resource features automatic job creation in runtime when creating new shops.
ESX
Navigate to es_extended/server/functions.lua
and find the following function:
ESX.CreateJob()
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:
--- 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
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-core
AddJob 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
.
['t1gertuner'] = {
label = 'T1GER Tuner',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = {
name = 'Recruit',
payment = 50
},
['1'] = {
name = 'Employee',
payment = 75
},
['2'] = {
name = 'Boss',
isboss = true,
payment = 100
},
},
},
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
8 - Configuration
Language
Navigate to t1ger_tuningsystem/shared/language.lua
to customize all strings to translate them into your preferred language.
Maybe there's a translation in your language ready? Refer to: Translations.
Config
Navigate to t1ger_tuningsystem/shared/config.lua
to configure settings & options to your linking. Make sure to read the end-line comments.
If you enable
UseSocietyAccount
option, make sure you have setup Society Account int1ger_lib
.Preview of all options: Config.
Mods
Navigate to t1ger_tuningsystem/shared/mods.lua
to customize all the mods, including pricing and so on. Refer to Vehicle Mods.
9 - Ready
Once you are fully done, you have successfully installed T1GER Tuning System. Now restart your server and enjoy the resource!
Last updated