# Installation

## 1 - Ensure Dependencies

Make sure T1GER Library is installed and the required dependencies are ensured. Please refer to [installation](https://docs.t1ger.net/resources/t1ger-library/installation "mention").

## 2 - Get T1GER Tuning System

* Get the `t1ger_tuningsystem` resource from: <https://store.t1ger.net/package/6044615>
* Download from: [FiveM's Keymaster](https://keymaster.fivem.net/login?return_url=/asset-grants).

## 3 - Ensure T1GER Tuning System

* Unzip `t1ger_tuningsystem.zip` folder and place it into your `resource` folder. You can place it in a sub-folder as well.&#x20;
* Add `ensure t1ger_tuningsystem` to your server start config. <mark style="color:red;">Make sure to ensure it after all the dependencies!</mark>

<div align="left"><figure><img src="https://2167335559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiDWIMbFBeXle-trOlk%2Fuploads%2FZYoj8lXu8SOIbwLlqYjc%2Fimage.png?alt=media&#x26;token=77906c58-78e8-4775-9858-b6f049873782" alt=""><figcaption><p>Example of my startup order in server.cfg</p></figcaption></figure></div>

## 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).&#x20;

{% code title="main.sql" %}

```sql
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,
	`markup` 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 ('[]'),
	`orders` LONGTEXT NOT NULL DEFAULT ('[]'),
	`delivery` LONGTEXT NULL DEFAULT NULL,
	PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `t1ger_engineswaps`;
CREATE TABLE `t1ger_engineswaps` (
	`plate` VARCHAR(12) NOT NULL,
	`vehicle` VARCHAR(60) NOT NULL,
	`engine` VARCHAR(60) NOT NULL,
	PRIMARY KEY (`plate`)
);


DROP TABLE IF EXISTS `t1ger_nitrous`;
CREATE TABLE `t1ger_nitrous` (
	`plate` VARCHAR(12) NOT NULL,
	`size` INT(11) NOT NULL,
	`shots` INT(11) NOT NULL DEFAULT 0,
	`burst` INT(11) NOT NULL,
	`color` VARCHAR(255) NOT NULL,
	PRIMARY KEY (`plate`)
);

DROP TABLE IF EXISTS `t1ger_dyno`;
CREATE TABLE `t1ger_dyno` (
	`plate` VARCHAR(12) NOT NULL,
	`torque` FLOAT(11) NOT NULL,
	`power` FLOAT(11) NOT NULL,
	`brakes` FLOAT(11) NOT NULL,
	PRIMARY KEY (`plate`)
);
```

{% endcode %}

## 5 - Items

{% hint style="danger" %}
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.
{% endhint %}

<details>

<summary><strong>ESX</strong></summary>

1. Open your database and find the items table.
2. Run this query in your database to insert the items.

```sql
INSERT IGNORE INTO `items` (`name`, `label`) VALUES
	-- Kits:
	('tuner_tablet', 'Tuner Tablet'),
	('tuner_repairkit', 'Tuner Repair Kit'),
	('tuner_enghoist', 'Tuner Engine Hoist'),
	('nos_shots_bottle', 'NOS 10-Shots (1lb)'),
	('nos_empty_bottle', 'NOS Empty (1lb)'),
	('nos_purge_dye', 'NOS Purge Dye'),
	-- 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'),
	-- Mods:
	('mod_engine', 'Vehicle Engine'),
	('mod_brakes', 'Vehicle Brake'),
	('mod_transmission', 'Vehicle Transmission'),
	('mod_suspension', 'Vehicle Suspension'),
	('mod_armor', 'Vehicle Armor'),
	('mod_turbo', 'Vehicle Turbo'),
	('mod_exhaust', 'Vehicle Exhaust'),
	('mod_extras', 'Vehicle Extras'),
	('mod_exterior', 'Vehicle Exterior'),
	('mod_interior', 'Vehicle Interior'),
	('mod_fender', 'Vehicle Fender'),
	('mod_frame', 'Vehicle Chassis'),
	('mod_frontbumper', 'Vehicle Front Bumper'),
	('mod_grille', 'Vehicle Grille'),
	('mod_hood', 'Vehicle Hood'),
	('mod_horn', 'Vehicle Horn'),
	('mod_light', 'Vehicle Light'),
	('mod_livery', 'Vehicle Livery'),
	('mod_neon', 'Vehicle Neon'),
	('mod_plate', 'Vehicle Plate'),
	('mod_rearbumper', 'Vehicle Rear Bumper'),
	('mod_respray', 'Vehicle Respray'),
	('mod_rim', 'Vehicle Rim'),
	('mod_roof', 'Vehicle Roof'),
	('mod_sideskirt', 'Vehicle Side Skirt'),
	('mod_spoiler', 'Vehicle Spoiler'),
	('mod_tyresmoke', 'Vehicle Tyre Smoke'),
	('mod_windowtint', 'Vehicle Window Tint'),
	('mod_bullettires', 'Bulletproof Tires'),
	('mod_drifttires', 'Drift Tires'),
	('mod_stocktires', 'Stock Tires')
;
```

</details>

<details>

<summary><strong>QBCore</strong></summary>

1. Navigate to `qb-core/shared/items.lua` and open up the file.
2. Insert the following items into the file:

<pre class="language-lua"><code class="lang-lua">    -- Kits | T1GER Tuning System
    ['tuner_tablet']          = {['name'] = 'tuner_tablet', 		['label'] = 'Tuner Tablet',		['weight'] = 1,		['type'] = 'item',		['image'] = 'tuner_tablet.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'},
    ['tuner_enghoist']    = {['name'] = 'tuner_enghoist',	        ['label'] = 'Tuner Engine Hoist',	['weight'] = 1,		['type'] = 'item',		['image'] = 'tuner_enghoist.png',		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'Engine Hoist used by tuners'},
    ['nos_shots_bottle']     = {['name'] = 'nos_shots_bottle',	        ['label'] = 'NOS 10-Shots (1lb)',	['weight'] = 3,		['type'] = 'item',		['image'] = 'nos_shots_bottle.png',		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'NOS Bottle (1lb) containing 10 shots, to be add in vehicles'},
    ['nos_empty_bottle']     = {['name'] = 'nos_empty_bottle',	        ['label'] = 'NOS Empty (1lb)',		['weight'] = 1,		['type'] = 'item',		['image'] = 'nos_empty_bottle.png',		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'Empty NOS Bottle (1lb) without any shots. Can be refilled.'},
    ['nos_purge_dye']     = {['name'] = 'nos_purge_dye',	        ['label'] = 'NOS Purge Dye',		['weight'] = 1,		['type'] = 'item',		['image'] = 'nos_purge_dye.png',		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'NOS Purge Dye to alter color using RGB.'},
    -- Mods | T1GER Tuning System
    ['mod_engine']           = {['name'] = 'mod_engine', 		['label'] = 'Vehicle Engine', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_engine.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Engine Mod'},
    ['mod_brakes']           = {['name'] = 'mod_brakes', 		['label'] = 'Vehicle Brake', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_brakes.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Brake Mod'},
    ['mod_transmission']     = {['name'] = 'mod_transmission', 	        ['label'] = 'Vehicle Transmission', ['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_transmission.png', 	['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Transmission Mod'},
    ['mod_suspension']       = {['name'] = 'mod_suspension', 	        ['label'] = 'Vehicle Suspension', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_suspension.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Suspension Mod'},
    ['mod_armor']            = {['name'] = 'mod_armor', 		['label'] = 'Vehicle Armor', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_armor.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Armor Mod'},
    ['mod_turbo']            = {['name'] = 'mod_turbo', 		['label'] = 'Vehicle Turbo', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_turbo.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Turbo Mod'},
    ['mod_exhaust']          = {['name'] = 'mod_exhaust', 		['label'] = 'Vehicle Exhaust', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_exhaust.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Exhaust Mod'},
    ['mod_extras']           = {['name'] = 'mod_extras', 		['label'] = 'Vehicle Extras', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_extras.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Extras Mod'},
    ['mod_exterior']         = {['name'] = 'mod_exterior', 		['label'] = 'Vehicle Exterior', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_exterior.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Exterior Mod'},
    ['mod_interior']         = {['name'] = 'mod_interior', 		['label'] = 'Vehicle Interior', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_interior.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Interior Mod'},
    ['mod_fender']           = {['name'] = 'mod_fender', 		['label'] = 'Vehicle Fender', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_fender.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Fender Mod'},
    ['mod_frame']            = {['name'] = 'mod_frame', 		['label'] = 'Vehicle Chassis', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_frame.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Chassis Mod'},
    ['mod_frontbumper']      = {['name'] = 'mod_frontbumper', 	        ['label'] = 'Vehicle Front Bumper', ['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_frontbumper.png', 	    ['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Front Bumper Mod'},
    ['mod_grille']           = {['name'] = 'mod_grille', 		['label'] = 'Vehicle Grille', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_grille.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Grille Mod'},
    ['mod_hood']             = {['name'] = 'mod_hood', 		        ['label'] = 'Vehicle Hood', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_hood.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Hood Mod'},
    ['mod_horn']             = {['name'] = 'mod_horn', 		        ['label'] = 'Vehicle Horn', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_horn.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Horn Mod'},
    ['mod_light']            = {['name'] = 'mod_light', 		['label'] = 'Vehicle Light', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_light.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Light Mod'},
    ['mod_livery']           = {['name'] = 'mod_livery', 		['label'] = 'Vehicle Livery', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_livery.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Livery Mod'},
    ['mod_neon']             = {['name'] = 'mod_neon', 		        ['label'] = 'Vehicle Neon', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_neon.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Neon Mod'},
    ['mod_plate']            = {['name'] = 'mod_plate', 		['label'] = 'Vehicle Plate', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_plate.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Plate Mod'},
    ['mod_rearbumper']       = {['name'] = 'mod_rearbumper', 	        ['label'] = 'Vehicle Rear Bumper', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_rearbumper.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Rear Bumper Mod'},
    ['mod_respray']          = {['name'] = 'mod_respray', 		['label'] = 'Vehicle Respray', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_respray.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Respray Mod'},
    ['mod_rim']              = {['name'] = 'mod_rim', 		        ['label'] = 'Vehicle Rim', 		    ['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_rim.png', 				['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Rim Mod'},
    ['mod_roof']             = {['name'] = 'mod_roof', 		        ['label'] = 'Vehicle Roof', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_roof.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Roof Mod'},
    ['mod_sideskirt']        = {['name'] = 'mod_sideskirt', 	        ['label'] = 'Vehicle Side Skirt', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_sideskirt.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Side Skirt Mod'},
    ['mod_spoiler']          = {['name'] = 'mod_spoiler', 		['label'] = 'Vehicle Spoiler', 		['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_spoiler.png', 			['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Spoiler Mod'},
    ['mod_tyresmoke']        = {['name'] = 'mod_tyresmoke', 	        ['label'] = 'Vehicle Tyre Smoke', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_tyresmoke.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Tyre Smoke Mod'},
    ['mod_windowtint']       = {['name'] = 'mod_windowtint', 	        ['label'] = 'Vehicle Window Tint', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_windowtint.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Vehicle Window Tint Mod'},
    ['mod_bullettires']      = {['name'] = 'mod_bullettires', 	        ['label'] = 'Bulletproof Tires', 	['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_bullettires.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Bulletproof Tires Mod'},
    ['mod_drifttires']       = {['name'] = 'mod_drifttires', 	        ['label'] = 'Drift Tires', 		    ['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_drifttires.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Drift Tires Mod'},
    ['mod_stocktires']       = {['name'] = 'mod_stocktires', 	        ['label'] = 'Stock Tires', 		    ['weight'] = 1,		['type'] = 'item',		['image'] = 'mod_stocktires.png', 		['unique'] = false,		['useable'] = true,	        ['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'T1GER Tuning - Stock Tires Mod'},
    -- Materials | T1GER Tuning System
<strong>    ['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'},
</strong>    ['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'},
<strong>    ['brass']                = {['name'] = 'brass', 			['label'] = 'Brass', 				['weight'] = 1,		['type'] = 'item',		['image'] = 'brass.png', 				['unique'] = false,		['useable'] = false,		['shouldClose'] = true,		['combinable'] = nil,	['description'] = 'Material - Brass'},
</strong><strong>    ['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'},
</strong>    ['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'},
</code></pre>

<mark style="color:orange;">**Please note, if you already have**</mark> [t1ger-mechanic-system](https://docs.t1ger.net/resources/t1ger-mechanic-system "mention") <mark style="color:orange;">**installed, skip the materials as they are already added.**</mark>&#x20;

</details>

<details>

<summary><strong>OX Inventory</strong></summary>

1. Navigate to `ox_inventory/data/items.lua`.
2. Insert the following items into the file:

```lua
    -- Kits
    ["tuner_tablet"] = {
        label = "Tuner Tablet",
        weight = 1,
        stack = true,
        close = true,
    },
    ["tuner_repairkit"] = {
        label = "Tuner Repair Kit",
        weight = 1,
        stack = true,
        close = true,
    },
    ["tuner_enghoist"] = {
        label = "Tuner Engine Hoist",
        weight = 1,
        stack = true,
        close = true,
    },
    ["nos_shots_bottle"] = {
        label = "NOS 10-Shots (1lb)",
        weight = 3,
        stack = true,
        close = true,
    },
    ["nos_empty_bottle"] = {
        label = "NOS Empty (1lb)",
        weight = 1,
        stack = true,
        close = true,
    },
    ["nos_purge_dye"] = {
        label = "NOS Purge Dye",
        weight = 1,
        stack = true,
        close = true,
    },
    -- Materials:
    ["scrap_metal"] = {
        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,
    },
    -- Mods:
    ["mod_engine"] = {
        label = "Vehicle Engine",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_brakes"] = {
        label = "Vehicle Brake",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_transmission"] = {
        label = "Vehicle Transmission",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_suspension"] = {
        label = "Vehicle Suspension",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_armor"] = {
        label = "Vehicle Armor",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_turbo"] = {
        label = "Vehicle Turbo",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_exhaust"] = {
        label = "Vehicle Exhaust",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_extras"] = {
        label = "Vehicle Extras",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_exterior"] = {
        label = "Vehicle Exterior",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_interior"] = {
        label = "Vehicle Interior",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_fender"] = {
        label = "Vehicle Fender",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_frame"] = {
        label = "Vehicle Chassis",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_frontbumper"] = {
        label = "Vehicle Front Bumper",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_grille"] = {
        label = "Vehicle Grille",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_hood"] = {
        label = "Vehicle Hood",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_horn"] = {
        label = "Vehicle Horn",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_light"] = {
        label = "Vehicle Light",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_livery"] = {
        label = "Vehicle Livery",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_neon"] = {
        label = "Vehicle Neon",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_plate"] = {
        label = "Vehicle Plate",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_rearbumper"] = {
        label = "Vehicle Rear Bumper",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_respray"] = {
        label = "Vehicle Respray",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_rim"] = {
        label = "Vehicle Rim",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_roof"] = {
        label = "Vehicle Roof",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_sideskirt"] = {
        label = "Vehicle Side Skirt",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_spoiler"] = {
        label = "Vehicle Spoiler",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_tyresmoke"] = {
        label = "Vehicle Tyre Smoke",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_windowtint"] = {
        label = "Vehicle Window Tint",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_bullettires"] = {
        label = "Bulletproof Tires",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_drifttires"] = {
        label = "Drift Tires",
        weight = 1,
        stack = true,
        close = true,
    },
    ["mod_stocktires"] = {
        label = "Stock Tires",
        weight = 1,
        stack = true,
        close = true,
    },
```

<mark style="color:orange;">**Please note, if you already have**</mark> [t1ger-mechanic-system](https://docs.t1ger.net/resources/t1ger-mechanic-system "mention") <mark style="color:orange;">**installed, skip the materials as they are already added.**</mark>&#x20;

</details>

{% hint style="success" %}
Inventory item icons/images can be found in the resource folder or download them directly here:
{% endhint %}

{% file src="<https://2167335559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiDWIMbFBeXle-trOlk%2Fuploads%2FAPlLYiGDncvgi0jbkGA9%2Ficons.zip?alt=media&token=b0c914cd-c66c-4a6c-9599-36a308e9f489>" %}
Inventory Icons
{% endfile %}

## 6 - (Automatic) Job Creation

The resource features automatic job creation in runtime when creating new shops.

<details>

<summary>ESX</summary>

<mark style="color:red;">**With recent ESX updates, you may need to navigate to**</mark><mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**`es_extended/server/modules/createJob.lua`**</mark><mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**and replace ESX.CreateJob() with the function below.**</mark>&#x20;

If you don't have that folder/file, then navigate to `es_extended/server/functions.lua` and find the following function:

```lua
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:&#x20;

```lua
--- 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.&#x20;

</details>

<details>

<summary>QBCore</summary>

If you are on `qb-core` framework you don't need to alter any functions.&#x20;

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](https://docs.qbcore.org/qbcore-documentation/qb-core/shared-exports#exports-qb-core-addjob), 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:

1. Navigate to `qb-core/shared/jobs.lua`.
2. 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`.

```lua
['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
        },
    },
},
```

It's very important that the job name (`'t1gertuner'`) matches the [Broken link](https://docs.t1ger.net/resources/t1ger-tuning-system/broken-reference "mention") field in the [Broken link](https://docs.t1ger.net/resources/t1ger-tuning-system/broken-reference "mention") menu. Also make sure the very last grade you have, has the `isboss = true` parameter.&#x20;

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.&#x20;

The In-game in the shop-creator for this particular job, should look like this:

![](https://2167335559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiDWIMbFBeXle-trOlk%2Fuploads%2FJL1GnOttHtjjnBXODz1Q%2Fimage.png?alt=media\&token=714d04e6-48a6-4a7a-b72a-c733191cfcff)

Where:

* Shop Name: is a user-defined name for the shop.
* Job Name: is the job name (<mark style="color:red;">lower char, no spaces and no special chars</mark>).
* Job Label: is the displayed label of the job.

Now, the resource will automatically fetch the stored data for this job.&#x20;

</details>

## 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](https://docs.t1ger.net/resources/t1ger-library/installation/vehicle-properties "mention") and follow the [#setup](https://docs.t1ger.net/t1ger-library/installation/vehicle-properties#setup "mention") instructions.&#x20;

## 8 - Configuration

#### Language

Navigate to `t1ger_tuningsystem/shared/language.lua` to customize all strings to translate them into your preferred language.

{% content-ref url="broken-reference" %}
[Broken link](https://docs.t1ger.net/resources/t1ger-tuning-system/broken-reference)
{% endcontent-ref %}

#### Config

Navigate to `t1ger_tuningsystem/shared/config.lua` to configure settings & options to your liking. Make sure to read the end-line comments.

* If you enable `UseSocietyAccount` option, make sure you have setup [society-account](https://docs.t1ger.net/resources/t1ger-library/installation/society-account "mention") in `t1ger_lib`.

#### Mods

Navigate to `t1ger_tuningsystem/shared/mods.lua` to customize all the mods, including pricing and so on. Refer to [vehicle-mods](https://docs.t1ger.net/resources/t1ger-tuning-system/guides/vehicle-mods "mention").

## 9 - Ready

Once you are fully done, you have successfully installed T1GER Tuning System. Now restart your server and enjoy the resource!
