Crafting System (QB)


Summary

this script provides you an advanced crafting system with a great UI for your items including weapons


Video



features

  • fully optimized 0.00 ms and while crafting 0.02 ms

  • everything is clear on UI such as requirements, item image and item count

  • super easy to add your items and weapons to config.lua

  • you can set for each item how long it takes to be crafted

  • you can set requirements for each item and weapon

  • you can set many locations in order to craft with specific and individual items for each one

  • you can set a specific job for each location so only that job will access to that craft menu

  • if you do not set a job so it will become public and every player can access to the menu

  • while crafting items you can choose the count of that item you are going to craft

  • you can choose which requirements can be destroyed after craft or not

  • included a tutorial video


requirements

  • qb core

  • progressBars (optional)


Config File


Config                            = {}
Config.DrawDistance               = 30.0
local second = 1000

Config.AmmoAmountInCraft          = 150 -- the ammo amount for the weapon that player crafts

Config.Items = {

	WEAPON_SNSPISTOL = {
		ItemName = 'WEAPON_SNSPISTOL',
		ItemType = 'weapon',
		ItemLabel = 'SNS Pistol',
		ItemImage = 'weapon_snspistol.png',
		CraftTime = 10 * second,
		Requirements = {
			{name = 'iron', count = 2, label = 'Iron Bar', image = 'iron.png'},
			{name = 'copper', count = 5, label = 'Copper Bar', image = 'copper.png'},
		}
	},

	WEAPON_SMG = {
		ItemName = 'WEAPON_SMG',
		ItemType = 'weapon',
		ItemLabel = 'SMG Gun',
		ItemImage = 'weapon_smg.png',
		CraftTime = 20 * second,
		Requirements = {
			{name = 'gold', count = 3, label = 'Gold Bar', image = 'gold.png'},
			{name = 'iron', count = 2, label = 'Iron Bar', image = 'iron.png'},
			{name = 'copper', count = 5, label = 'Copper Bar', image = 'copper.png'},
			{name = 'diamond', count = 1, label = 'Diamond', image = 'diamond.png'},
			{name = 'packaged_plank', count = 1, label = 'Plank', image = 'packaged_plank.png'},
		}
	},
	
	WEAPON_PISTOL50 = {
		ItemName = 'WEAPON_PISTOL50',
		ItemType = 'weapon',
		ItemLabel = 'Pistol50',
		ItemImage = 'weapon_pistol50.png',
		CraftTime = 10 * second,
		Requirements = {
			{name = 'gold', count = 3, label = 'Gold Bar', image = 'gold.png'},
			{name = 'iron', count = 1, label = 'Iron Bar', image = 'iron.png'},
			{name = 'packaged_plank', count = 1, label = 'Plank', image = 'packaged_plank.png'},
		}
	},
	
	WEAPON_COMBATPDW = {
		ItemName = 'WEAPON_COMBATPDW',
		ItemType = 'weapon',
		ItemLabel = 'Combat PDW',
		ItemImage = 'weapon_combatpdw.png',
		CraftTime = 10 * second,
		Requirements = {
			{name = 'gold', count = 3, label = 'Gold Bar', image = 'gold.png'},
			{name = 'iron', count = 2, label = 'Iron Bar', image = 'iron.png'},
			{name = 'copper', count = 5, label = 'Copper Bar', image = 'copper.png'},
			{name = 'diamond', count = 1, label = 'Diamond', image = 'diamond.png'},
			{name = 'packaged_plank', count = 1, label = 'Plank', image = 'packaged_plank.png'},
		}
	},
	
	smgAmmo = {
		ItemName = 'smgAmmo',
		ItemType = 'item',
		ItemLabel = 'SMG Ammo',
		ItemImage = 'smgAmmo.png',
		CraftTime = 5 * second,
		Requirements = {
			{name = 'iron', count = 1, label = 'Iron Bar', image = 'iron.png'},
		}
	},
	
	arAmmo = {
		ItemName = 'arAmmo',
		ItemType = 'item',
		ItemLabel = 'Rifle Ammo',
		ItemImage = 'arAmmo.png',
		CraftTime = 5 * second,
		Requirements = {
			{name = 'iron', count = 2, label = 'Iron Bar', image = 'iron.png'},
		}
	},	
	
	carbomb = {
		ItemName = 'carbomb',
		ItemType = 'item',
		ItemLabel = 'Car Bomb',
		ItemImage = 'carbomb.png',
		CraftTime = 5 * second,
		Requirements = {
			{name = 'sodium_hydroxide', count = 2, label = 'Sodium Hydroxide', image = 'sodium_hydroxide.png'},
			{name = 'sulfuric_acid', count = 2, label = 'Sulfuric Acid', image = 'sulfuric_acid.png'},
			{name = 'gold', count = 1, label = 'Gold Bar', image = 'gold.png'},
			{name = 'iron', count = 1, label = 'Iron Bar', image = 'iron.png'},
			{name = 'copper', count = 1, label = 'Copper Bar', image = 'copper.png'},
		}
	},	

}

-- if you want some items do not get removed from inventory after crafting then add them here

Config.ItemsWillRemain = {
	iron = true, -- just an example
	anotheritem = true
}

Config.CraftLocations = {
	Loc1 = {
		JobName = '', -- leave it blank if you want everyone access to it
		CraftingCoords = vector3(473.28, -1312.98, 28.21),
		CraftHeading     = 117.92,
		Marker = {
			Coords = vector3(473.28, -1312.98, 29.21),
			Size  = { x = 1.0, y = 1.0, z = 1.0 },
			Color = { r = 0, g = 0, b = 150 },
			Type  = 41,
			Rotate = true,
		},
		Blip = {
			Show = true,
			BlipCoords = vector3(473.28, -1312.98, 29.21),
			BlipSize = 1.0,
			BlipID = 439,
			BlipColor = 3,
			BlipText = 'craft1'
		},
		Items = {"arAmmo", "smgAmmo", "carbomb"}
	},
	Loc2 = {
		JobName = '',
		CraftingCoords = vector3(472.37, -1310.15, 28.23),
		CraftHeading     = 117.92,
		Marker = {
			Coords = vector3(472.37, -1310.15, 29.23),
			Size  = { x = 1.0, y = 1.0, z = 1.0 },
			Color = { r = 150, g = 0, b = 150 },
			Type  = 42,
			Rotate = true,
		},
		Blip = {
			Show = false,
			BlipCoords = vector3(472.37, -1310.15, 29.23),
			BlipSize = 1.0,
			BlipID = 400,
			BlipColor = 2,
			BlipText = 'craft2'
		},
		Items = {"WEAPON_PISTOL50", "WEAPON_SMG", "WEAPON_SNSPISTOL", "WEAPON_COMBATPDW"}
	},
}


Tebex

you can buy the script from HERE



Also Check my Newest Project



my Other Script

Advanced Lock System (QB, ESX)
Uber Eats (ESX, QB)
ESX Society Remastered
Realistic Fast Food
ESX Car Bomb
ESX Books + Reading
VIP List + Test Drive
ESX Craft System
ESX Jobs List
ESX Document Robbery
ESX Multiple Simcards
Realistic Coffee Job (ESX)



Code is accessible some parts
Subscription-based No
Lines (approximately) 500
Requirements QB
Support Yes

added to server did everything stated and showed in your video and get progressbaar error and get stuck at table take out progressbars and then get nothing im lost on why its not working as it should unless its just for esx and no qb as i have qb an get nothing!

hello
please contact me on Discord so I can solve your problem

1 Like