# Item

```lua
["water"] = {
    name = "water",
    label = "Water",
    weight = 1000,
    type = "item",
    durability = 1.0,   -- 1 hour
    decay = true,       -- will be removed if item quality reach to 0
    close = true,       -- close inventory on use item
    limit = 100,        -- total limit (only applied to player inventory)
    stacksize = 10,     -- limit for each slot

    client = {
        onUse = function(item)
            --this code will execute on item use

        end,
        onAdd = function(item)
            --this code will execute when you reveive this item

        end,
        onRemove = function(item)
            --this code will execute when item removed from your inventory

        end,
        TriggerEvent = 'Your Trigger Name Here',
        TriggerServerEvent = 'Your Server Trigger Name Here',
    },
    server = {
        onUse = function(source, item)
            --this code will execute on item use

        end,
        onAdd = function(source, slot)
            --this code will execute when you reveive this item

        end,
        onRemove = function(source, slot)
            --this code will execute when item removed from your inventory
            
        end,
        TriggerEvent = 'Trigger Name Here',
        TriggerClientEvent = 'Your Client Trigger Name Here',
    },

    consume = {
        attachment = { -- optional
            prop = 'prop_ld_flow_bottle',
            bone = 18905,
            position = vector3(0.12, 0.008, 0.03),
            rotation = vector3(240.0, -60.0, 0.0)
        },
        --[[
        attachment2 = { -- optional
            prop = 'prop_ld_flow_bottle',
            bone = 18905,
            position = vector3(0.12, 0.008, 0.03),
            rotation = vector3(240.0, -60.0, 0.0)
        },
        ]]
        animation = { -- optional
            dict = 'mp_player_intdrink',
            anim = 'loop_bottle',
            blendIn = 2.0,
            blendOut = 2.0,
            flag = 49,
        },
        progress = { -- optional
            label = 'Drinking Water',
            disable = {
                car = false,
                combat = false,
                move = false,
            }
        },
        status = { -- optional
            hunger = 50, --negative value supported (-50)
            thirst = 50, --negative value supported (-50)
            stress = 25, --negative value supported (-25)
        },

        delay = 5000,
        remove = 0.4, -- set 1 to remove 1 item after consuming. If you set 0.4 then it will remove 40% item quality
    }
},
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.menanak47.com/esx/ak47_inventory/templates/item.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
