Custom Inventory
Custom Inventory Integration Guide
1. Configuration Changes
2. Server-Side Integration
Required Functions
--- Searches the player's inventory for the specified item.
--- @param source number The player's source ID.
--- @return table item data if found, an empty table otherwise.
function SearchPhoneItems(source)
local itemData = {}
-- Your Custom Inventory Logic Here
-- Example (Pseudo-code):
-- local playerItems = exports['my-inventory']:GetPlayerItems(source)
-- for _, item in pairs(playerItems) do
-- if Config.ItemName[item.name] then
-- table.insert(itemData, item)
-- end
-- end
return itemData
end3. Client-Side Integration
Handling Item Removal
Handling Item Addition
Checklist
Reference Example (Based on ox_inventory)
Server-Side Example (server/inventory/custom.lua)
server/inventory/custom.lua)Client-Side Example (client/inventory/custom.lua)
client/inventory/custom.lua)Last updated