Installation & Configuration

First, you need to install the scripts required for Qubit Car Crafting to work. After installing these scripts, you can put qubit-carcrafting into your resources folder and run it.

1. Framework Configration

Qubit Car Crafting supports ESX and QB frameworks. If you're using a different framework, unfortunately you won't be able to run Qubit Car Crafting.

Open the config.lua and fxmanifest.lua change framework setttings for your needs

QBCore Settings

If you're using the qbcore framework, you should configure the framework settings in the config as follows

Open config.lua and change these lines

Config.Framework = "QB" -- QB, oldESX, ESX
Config.CoreName = 'qb-core' -- qb-core, es_extended
Config.MenuName = 'qb-menu' -- qb-menu, ox_lib
Config.Target = "qb-target" -- qb-target, ox_target
Config.CustomLicenseColumn = 'license' 

Open fxmanifest.lua and change these lines

shared_scripts {
    'config.lua',
    "@ox_lib/init.lua",

    '@qb-core/shared/locale.lua', -- Open if you are using QB
    'locales/qb/*.lua', -- Open if you are using QB

    --'@es_extended/locale.lua', -- Open if you are using ESX
    --'locales/esx/*.lua',-- Open if you are using ESX

    'functions.lua',
}
ESX Settings

If you're using the qbcore framework, you should configure the framework settings in the config as follows

Open config.lua and change these lines

Config.Framework = "ESX" -- QB, oldESX, ESX
Config.CoreName = 'es_extended' -- qb-core, es_extended
Config.MenuName = 'ox_lib' -- qb-menu, ox_lib
Config.Target = "ox_target" -- qb-target, ox_target
Config.CustomLicenseColumn = 'license' 

Open fxmanifest.lua and change these lines

shared_scripts {
    'config.lua',
    '@ox_lib/init.lua',

    --'@qb-core/shared/locale.lua', -- Open if you are using QB
    --'locales/qb/*.lua', -- Open if you are using QB

    '@es_extended/locale.lua', -- Open if you are using ESX
    'locales/esx/*.lua',-- Open if you are using ESX

    'functions.lua',
}

2. Importing Items

All items in car crafting are fully customizable. We have included a few items for crafting a vehicle, but you can change all of these or add any others you want.

If you are using QBCore or OX, you don't need to import the SQL.

QBCore Item Configration

Go to the qb-core folder, open qb-core/shared/items.lua, and add the crafting items line at the bottom

 -- Car Crafting
['toolkit']  = {
    ['name'] = 'toolkit',
    ['label'] = 'Toolkit',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'toolkit.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'It is used to produce some things.'
},

['car_door']  = {
    ['name'] = 'door',
    ['label'] = 'Car Doors',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'door.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle door can be used in vehicle crafting.'
},

['car_battery']  = {
    ['name'] = 'car_battery',
    ['label'] = 'Car Battery',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'car_battery.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle battery can be used in vehicle crafting.'
},

['sparkplug']  = {
    ['name'] = 'sparkplug',
    ['label'] = 'Car Sparkplug',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'sparkplug.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle sparkplug can be used in vehicle crafting.'
},

['wheel']  = {
    ['name'] = 'wheel',
    ['label'] = 'Car Wheel',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'wheel.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle wheel can be used in vehicle crafting.'
},

['car_glass']  = {
    ['name'] = 'car_glass',
    ['label'] = 'Car Glass',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'car_glass.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle glass can be used in vehicle crafting.'
},

['car_blueprint']  = {
    ['name'] = 'car_blueprint',
    ['label'] = 'Car Blueprint',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'car_blueprint.png',
    ['unique'] = false,
    ['useable'] = false,
    ['shouldClose'] = false,
    ['combinable'] = nil,
    ['description'] = 'Vehicle blueprint can be used in vehicle crafting.'
},
ESX Item Configration

Open your database and import these SQL lines for inventory.

INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('toolkit','Toolkit','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_door','Car Doors','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_battery','Car Battery','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('sparkplug','Car Sparkplug','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('wheel','Car Wheel','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_glass','Car Glass','1','1','1');
INSERT INTO `items`(`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('car_blueprint','Car Blueprint','1','1','1');
OX Item Configration

Go to ox_inventory/data/items.lua and copy & paste these items in bottom

	["toolkit"] = {
		label = "Toolkit",
		weight = 1,
		stack = true,
		close = true,
	},

	["car_door"] = {
		label = "Car Door",
		weight = 1,
		stack = true,
		close = true,
	},
	
	["car_battery"] = {
		label = "Car Battery",
		weight = 1,
		stack = true,
		close = true,
	},

	["car_blueprint"] = {
		label = "Car Blueprint",
		weight = 1,
		stack = true,
		close = true,
	},

	["car_glass"] = {
		label = "Car Glass",
		weight = 1,
		stack = true,
		close = true,
	},

	["sparkplug"] = {
		label = "Car Sparkplug",
		weight = 1,
		stack = true,
		close = true,
	},

	["wheel"] = {
		label = "Car Wheel",
		weight = 1,
		stack = true,
		close = true,
	},

3. Add Item Photos to Inventory

Place the item images you downloaded into the img or images folder of the inventory script you are using.

Setup Finished 🎉

Our setup is now complete, and from this point on, our tasks will be related to customizations. qubit-car crafting comes with 3 default craft areas, which cover cars, helicopters, and marine vehicles. If you wish, you can completely remove these areas and add your own types of zones. The image below details what each area is used for.

Red Plane crafting cars spawning with PolyZone function if you are enter this red plane.

Orange Box it's defining height of the red plane.

Green Zone it's defining craftable car positions, must be in the red plane, can be multiple.

Blue Zone it's defining crafted car spawn location.

Last updated