Custom Inventory
Setup
-- editable/shared/config.lua
Config.Inventory = "custom"File
Side
Server Stubs
CustomInventory.Server = {}
-- Add `count` of `name` to the player's inventory.
-- metadata and slot are optional.
-- Return true on success.
CustomInventory.Server.AddItem = function(src, name, count, metadata, slot)
return false
end
-- Remove `count` of `name` from the player's inventory.
-- Return true on success.
CustomInventory.Server.RemoveItem = function(src, name, count, metadata, slot)
return false
end
-- Return the total count of `name` in the player's inventory.
CustomInventory.Server.GetItemCount = function(src, name, metadata)
return 0
end
-- Return the full inventory as { [itemName] = count }.
CustomInventory.Server.GetItems = function(src)
return {}
endClient Stubs
Example
Last updated