Inventoryintermediate9 min readupdated 11 Sept 2026

Setting up crafting in ox_inventory

The short answer

Add a bench to ox_inventory/data/crafting.lua with items (recipes), points or zones for where it can be used, an optional blip and groups. Each recipe has a name, ingredients (item → amount), duration in ms and optional count and metadata. An ingredient value below 1 is a tool: it is not consumed but loses that fraction of durability (for example WEAPON_HAMMER = 0.05 = 5%).

Crafting turns scrap, parts and tools into useful items — lockpicks, repair kits, attachments, even weapons. ox_inventory handles the bench UI, ingredient checks and timers; you describe recipes in a data file.

Setting up crafting in ox_inventory — illustrated with a FiveM-compatible minimap render

#A crafting bench

ox_inventory/data/crafting.lua
{
    name = 'mechanic_bench',
    items = {
        {
            name = 'lockpick',
            ingredients = {
                scrapmetal = 5,
                WEAPON_HAMMER = 0.05,
            },
            duration = 5000,
            count = 2,
        },
        {
            name = 'repairkit',
            ingredients = { scrapmetal = 10, plastic = 4 },
            duration = 8000,
        },
    },
    zones = {
        { coords = vec3(-346.1, -130.45, 39.0), size = vec3(3.8, 1.05, 0.15), distance = 1.5, rotation = 70.0 },
    },
    groups = { mechanic = 0 },
    blip = { id = 566, colour = 31, scale = 0.8 },
},

#Tools and durability

WEAPON_HAMMER = 0.05 means the hammer must be in the inventory and loses 5% durability per craft instead of being used up. When durability reaches zero the tool breaks. It is a simple way to make tools matter without making them consumables. Durability itself is item metadata — see item metadata.

#Crafting weapons and attachments

  • Put weapon benches in hard-to-reach places and restrict them to gangs with groups.
  • Give crafted weapons metadata = { registered = false } or custom serials for police roleplay — see serial numbers.
  • Balance ingredient costs against shop prices so crafting is an alternative, not a money printer.

#Logging crafts

server.lua
exports.ox_inventory:registerHook('craftItem', function(payload)
    print(('player %s crafted %s'):format(payload.source, payload.recipe.name))
end, { itemFilter = { WEAPON_PISTOL = true } })
Share this guideXRedditFacebook

Questions

How do I add crafting to ox_inventory?
Add a bench to data/crafting.lua with recipes, a location (points or zones) and optional groups.
What does an ingredient value like 0.05 mean?
The item is a tool: it is not consumed but loses 5% durability per craft.
Can I restrict a crafting bench to a gang?
Yes, with groups = { gangname = 0 }.
Can crafted items have metadata?
Yes — add metadata to the recipe, for example { registered = false } for a weapon.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.

Relevant to what you just read

The tool for this

Twenty theme pairs for ox_lib and ox_inventory From $15, built in the browser, exported as a drop-in resource.

Look it up while you work

The reference tables this guide leans on, free and without an account.

  • All 966 blip sprite idsThe number SetBlipSprite takes, with the texture name beside it. Searchable, and one click copies a value.
  • Every GTA 5 zone nameAll 291 popzones across 44 districts, with the ids GET_NAME_OF_ZONE and GET_ZONE_FROM_NAME_ID use.
  • The same tables as JSON and CSVFree downloads, CORS open, no account and no API key — ship the list inside your own resource instead of scraping a page.