Inventorybeginner11 min readupdated 11 Sept 2026

Defining items in ox_inventory

The short answer

Add an entry to ox_inventory/data/items.lua with a label and a weight in grams. stack = false makes each item unique, close = false keeps the inventory open on use, consume sets how much is used (0 = not consumed, fractions reduce durability), and degrade makes it decay over minutes. The client table controls use: image, status, anim, prop, usetime, disable and export; a server.export runs server logic. Images go in ox_inventory/web/images/.

Every item in an ox_inventory server — food, tools, ammo, documents — is one table in data/items.lua. A few fields cover almost everything: how heavy it is, whether it stacks, what happens when it is used, and whether it wears out. This guide explains each with real examples.

Defining items in ox_inventory — illustrated with a FiveM-compatible minimap render

#A basic item

ox_inventory/data/items.lua
['fish'] = {
    label = 'Fish',
    weight = 400,
    description = 'Freshly caught. Sell it at the market.',
},

['burger'] = {
    label = 'Burger',
    weight = 220,
    client = {
        status = { hunger = 200000 },
        anim = 'eating',
        prop = 'burger',
        usetime = 2500,
        notification = 'You ate a delicious burger',
    },
},

#Top-level fields

FieldMeaning
labelDisplay name
weightGrams per item
stackfalse = every item is its own slot (default stacks)
closefalse = keep the inventory open when used
descriptionTooltip text
consumeAmount used per use: 1 (default), 0 (never), or a fraction of durability
degradeMinutes until the item fully degrades
buttonsExtra context-menu actions
client / serverUse behaviour on each side

#Client use options

items.lua — bandage
['bandage'] = {
    label = 'Bandage',
    weight = 115,
    client = {
        anim = { dict = 'missheistdockssetup1clipboard@idle_a', clip = 'idle_a', flag = 49 },
        prop = { model = `prop_rolled_sock_02`, pos = vec3(-0.14, -0.14, -0.08), rot = vec3(-50.0, -50.0, 0.0) },
        disable = { move = true, car = true, combat = true },
        usetime = 2500,
    },
},

status applies to supported status/needs systems; image overrides the default <item>.png file name.

#Your own use logic

items.lua
['repairkit'] = {
    label = 'Repair Kit',
    weight = 2500,
    client = { export = 'my_mechanic.repairkit' },
    server = { export = 'my_mechanic.repairkit' },
},
my_mechanic/client.lua
exports('repairkit', function(data, slot)
    local veh = lib.getClosestVehicle(GetEntityCoords(cache.ped), 3.0, false)
    if not veh then return lib.notify({ type = 'error', description = 'No vehicle nearby' }) end

    exports.ox_inventory:useItem(data, function(used)
        if used then SetVehicleEngineHealth(veh, 1000.0) end
    end)
end)
my_mechanic/server.lua
exports('repairkit', function(event, item, inventory, slot, data)
    if event == 'usingItem' then
        -- return false to cancel the use
    elseif event == 'usedItem' then
        print(('%s used a repair kit'):format(inventory.label))
    end
end)

useItem plays the configured animation and progress, then calls back with the result; the item is removed according to consume. Metadata such as durability and serials: item metadata.

#Item images

Put <itemname>.png (or .webp if your version supports it) in ox_inventory/web/images/. Square images of about 100–200 px keep the inventory light. Weapons use the same folder — see weapon item images. Pictures for the entries are the slow part: FAM Tools keeps a free icon library with the items.lua line written out beside each one.

Share this guideXRedditFacebook

Questions

How do I add an item to ox_inventory?
Add a table to ox_inventory/data/items.lua with at least label and weight, add an image to web/images, and restart the server.
What unit is weight in ox_inventory?
Grams.
How do I make an item not disappear on use?
Set consume = 0.
How do I run my own code when an item is used?
Set client.export and/or server.export to resource.exportName and define those exports in your resource.

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.