Installation

Resource installation guide and dependencies

Framework

Dependencies

Resource

Install

Description

Required

Framework, inventory, target and etc.

Required

Context menu, notification etc.

1 - Start

  1. Download your resource from FiveM's Keymaster.

  2. Unzip t1ger_tuningsystem.zip folder and place it into your resource folder.

  3. 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.

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 = {}, 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] = job
end

Make sure to add this function below ESX.CreateJob function, which will ensure your job is deleted when a mechanic shop is deleted.

function ESX.DeleteJob(name)
    --- @param name string
	if not name then
		return print('[^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] = nil
end

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

  1. Open your database and find the items table.

  2. Run the following query to insert items into your table:

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'),
-- 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')
;

QB Core

  1. Navigate to qb-core/shared/items.lua and open up the file.

  2. Insert the following items into the file:

Items for qb-core/shared/items.lua
-- 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'},

-- 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'},

5 - Configuration

You must go through all configurable options & settings in config.lua and configure them to your server's preferences.

Also please read the comments at the end of each line, for a brief information on what the option does.

6 - Ensure Dependencies

The required dependencies for this resource can be seen in Dependencies.

Make sure to start/ensure these dependencies in your server start config before T1GER Tuning System.

Start order in server.cfg should look like this:

ensure ox_lib ## mandatory
ensure ox_inventory ##(or other inventory, ex: qb-inventory)
ensure ox_target ##(or other target, ex: qb-target)
ensure t1ger_lib ## mandatory
ensure t1ger_tuningsystem ## mandatory

7 - Ready

Congratulations, you've successfully installed the resource. Restart the server and you will be all set.

Last updated