Skip to main content

GetItemBy

Returns an item with the specified search options.

  • findBy: table
    • name? string
    • itemHash? string
    • x? number
    • y? number
    • isWeared? boolean
    • meta? ItemMetaData

Returns InventoryItem

exports["avp_grid_inventory"]:GetItemBy(findBy)
Example
local res = exports["grid_inventory"]:GetItemBy({
name = "backpack",
meta ={
drawable = 40
}
})
print(json.encode(res, {indent=true}))
--[[
{
"itemHash": "1676773287-239214",
"y": 3,
"isRotated": false,
"x": 2,
"quantity": 1,
"meta": {
"texture": 0,
"drawable": 40
},
"isWeared": false,
"item": "backpack"
}
]]