GetInventoryClass
Returns the Inventory class based on the passed inv
argument type.
warning
I do not suggest you to use this function, if you do not know what you are doin!
- inv:
InventoryClass
exports["avp_grid_inventory"]:GetInventoryClass(inv)
info
With this inventory class you can easily call any inventory functions without needing to trigger the export functions.
Inventory
classes have separate folders, and every one of them inherits the main BaseInventory
class.
Example
local inventory = exports["avp_grid_inventory"]:GetInventory(1)
local class = exports["avp_grid_inventory"]:GetInventoryClass(inventory)
if type(class?.open) == "function" then
class.open(inventory)
end