Menan AK47
MENAN AK47DOCS
DiscordStore
Navigation
Menu
Welcome
FAQ
ak47_lib
ak47_target
ak47_ambulancejob
ak47_banking
ak47_business
ak47_carboosting
ak47_cardealer
ak47_clothingshop
ak47_crafting
ak47_crime
ak47_crutch
ak47_deliveryjob
ak47_drugdealerv2
ak47_drugmanagerv3
ak47_drugmissions
ak47_ecommerce
ak47_farming
ak47_fishing
ak47_fraudsystem
ak47_fuelstations
ak47_gangs
ak47_garage
ak47_garbagejob
ak47_hookahloungev2
ak47_housing
ak47_hud
ak47_iclothingv3
ak47_idcardv2
ak47_inventory
Installation
Qbox Installation
Exports
Event Handlers
Commands
Guides
Templates
Item
Weapon
Crafting
Stash
Shop
Vending
Dumpster
Tooltip
Fuel Script
ak47_jobgarage
ak47_khusbites
ak47_khusland
ak47_leafnlatte
ak47_mafiasupply
ak47_mechanic
ak47_moneywash
ak47_multicharacter
ak47_npcmed
ak47_outfitbag
ak47_playershop
ak47_policejob
ak47_prospecting
ak47_radio
ak47_rentalcar
ak47_safezone
ak47_sitchair
ak47_smokingv2
ak47_supermarket
ak47_switch
ak47_territories
ak47_vehiclekeys
ak47_vipshop
Loaf
DocsMulti FrameworkItem

Item

Configuration schema and parameter reference for standard and consumable inventory items.

Item Definition

Define standard items and consumables in shared/items.lua:

["water"] = {
    name = "water",
    label = "Water",
    weight = 1000,
    type = "item",      -- "item", "backpack"
    durability = 1.0,   -- 1 hour
    decay = true,       -- Removed when item quality reaches 0
    close = true,       -- Close inventory UI on item use
    limit = 100,        -- Total inventory quantity limit
    stacksize = 10,     -- Maximum stack quantity per slot

    client = {
        onUse = function(item)
            -- Executes on client when item is used
        end,
        onAdd = function(item)
            -- Executes on client when item is received
        end,
        onRemove = function(item)
            -- Executes on client when item is removed
        end,
        TriggerEvent = 'Your Trigger Name Here',
        TriggerServerEvent = 'Your Server Trigger Name Here',
    },
    server = {
        onUse = function(source, item)
            -- Executes on server when item is used
        end,
        onAdd = function(source, slot)
            -- Executes on server when item is received
        end,
        onRemove = function(source, slot)
            -- Executes on server when item is removed
        end,
        TriggerEvent = 'Trigger Name Here',
        TriggerClientEvent = 'Your Client Trigger Name Here',
    },

    consume = {
        attachment = {
            prop = 'prop_ld_flow_bottle',
            bone = 18905,
            position = vector3(0.12, 0.008, 0.03),
            rotation = vector3(240.0, -60.0, 0.0)
        },
        animation = {
            dict = 'mp_player_intdrink',
            anim = 'loop_bottle',
            blendIn = 2.0,
            blendOut = 2.0,
            flag = 49,
        },
        progress = {
            label = 'Drinking Water',
            disable = {
                car = false,
                combat = false,
                move = false,
            }
        },
        status = {
            hunger = 50,
            thirst = 50,
            stress = 25,
        },
        delay = 5000,
        remove = 0.4, -- Value of 1 removes item; 0.4 reduces quality by 40%
    }
},

Schema Parameters

Parameter Type Required Description
name string Yes Unique item identifier string
label string Yes Display name in inventory UI
weight number Yes Item weight in grams
type string Yes Item category (item, backpack)
durability number No Durability lifespan in hours
decay boolean No Delete item when durability reaches zero
close boolean No Close inventory UI on item consumption
limit number No Maximum total amount player can carry
stacksize number No Maximum stack quantity per slot
consume table No Props, animations, progress bar, and status effects
Previous
Commands
Next
Weapon
On this page
Item DefinitionSchema Parameters