[Release][ESX] Crafting System

Okay, I definitely need help. I’m trying to get this to work just at a basic level. I have two issues. 1) I can’t seem to get out of the menu without having to F8 quit. and 2) I’m providing the items but not getting the items back. I haven’t really done any modification to the basic script besides the removal of the ingredients.

Config = {}

– Ammo given by default to crafted weapons

Config.WeaponAmmo = 42

Config.Recipes = {

-- Can be a normal ESX item

["lockpick"] = { 

    {item = "bobbypin", quantity = 4 }, 

    {item = "rubberband", quantity = 1 },

},



-- Can be a weapon, must follow this format

['WEAPON_ASSAULTRIFLE'] = {

{ item = "steel", quantity = 2, remove = true },

{ item = "gunpowder", quantity = 3, remove = true },

}

– Enable a shop to access the crafting menu

Config.Shop = {

useShop = true,

shopCoordinates = { x=962.5, y=-1585.5, z=29.6 },

shopName = "Crafting Station",

shopBlipID = 446,

zoneSize = { x = 2.5, y = 2.5, z = 1.5 },

zoneColor = { r = 255, g = 0, b = 0, a = 100 }

}

– Enable crafting menu through a keyboard shortcut

Config.Keyboard = {

useKeyboard = false,

keyCode = 303

}

EDIT: I have the steel and gunpowder items in my SQL DB

are you solved?

Ended up figuring it out myself after a long, long time.

its working for me but there are items that its not showing in the menu it wont let me scroll down ?

It works great for me . Id like to add a suggestion
For example crafting an mk2 weapon if you have certain parts and a weapon prior to the mk2 lets say pumpshotgun you need to have and a grip a barrel and a stock to be able to craft mk2 shotgun. It will remove the current weapon and the items. Could you help me on making that? Instead of having an body_ak just wanted to use a current weapon to be removed and replaced by the mk2. Thanks

1 Like

Unless the menu wont let me use usable items to craft.

Also @SaltyGrandpa what about an esx crafting props using materials? Imagine someone wants to built something and can craft some walls or stuff. Just a suggestion

Any way to change the menu?

is there any way to get more then one item eg i craft 10 iron ore and get 5 iron 2 carbon and 3 nickel?

no news from dev on this script? that’s sad :(.

So how exactly do you change the recipe its very vague here and returns syntax errors when loading the config.
you say change [“lockpick”] = { to ["lockpick,4] This does not work and ive tried multiple ways to figure it out but no luck. Im new to lua and scripting so im a bit dumb.

can someone help me out, i want in that menu that you can see how much points i have. but i dont know how to setup it up?? plz help

Anyone knows if its possible to break down stuff? Like instead of crafting, you break down a battery and get multiple ingredients back? So like this?

[“copper”, “plastic”, “acid”] = {

{item = "carbattery", quantity = 1 }, 

},

how do you add more than 1 shop? @SaltyGrandpa sorry for ping.

Hello guys, the menu in the script doesn’t work, I set the keyboard shortcuts but on the game he doesn’t work, the error stay at line 59 when the function of keyboard is called, thanks for help

for me it gives me a error @esx_status/server/main.lua:7: can anyone help me?

I have one problem, in crafting system there is no .sql with the items, I personally add them to the items table of the database and it does not work, I cannot put them in the inventory nor can I do anything, please help

mee too :frowning:

this script works with es_extended v1.1?

i would suggest just adding a item for ammo, it will give your community more to do when crafting. my friends server has it and its really fun

Hi I can’t open the menu for crafting, how do I fix it?