This functionality is provided by the
_hooks/sv_craftings.lua hook. You just need to add your recipes to the CRAFTING_RECIPES table.How it works
1
Drag source onto target
Player drags a source item over a target item in the same inventory.
2
Recipe check
The system checks if there’s a matching recipe.
3
Crafting happens
If the recipe matches and quantities are sufficient, the crafting happens.
4
Items are consumed
Source and/or target items are removed (based on recipe settings).
5
Result is added
The result item is added to the inventory.
Step-by-step guide
1
Open the crafting hook
Navigate to:
jaksam_inventory/_hooks/sv_craftings.lua2
Find the recipes table
Find the
CRAFTING_RECIPES table (it’s near the top of the file).3
Add your recipe
Add your recipe following this format:
4
Restart
Save the file and restart the script/reload the server.
Recipe properties explained
number
How many of the source item are needed for the recipe
boolean
Set to
true if the source item should be removed after crafting, false to keep itstring
The exact name (as defined in
items.lua) of the item you drag the source item ontonumber
How many of the target item are needed for the recipe
boolean
Set to
true if the target item should be removed after crafting, false to keep itstring
The exact name (as defined in
items.lua) of the item that will be creatednumber
How many result items will be created
Examples
- Upgrade scope to thermal
- Combine materials
Combine a wrench with an advanced scope to create a thermal scope:How to use: Drag the wrench over the advanced scope → thermal scope is created, wrench stays, advanced scope is removed.
Important notes
Same inventory only
Crafting only works when both items are in the same inventory (you can’t drag from player inventory to vehicle inventory)
Item names must match
The
targetItem and resultItem names must exactly match the item names in _data/items.luaQuantity checks
The system automatically checks if you have enough items before crafting
Multiple recipes
You can add as many recipes as you want to the
CRAFTING_RECIPES table