Exports
Server-side Lua exports provided by ItemsDB.
All exports are server-side only.
-- Fetch a single item by name
local item = exports.ItemsDB:getItem('water')
-- Fetch all items as a table keyed by name
local items = exports.ItemsDB:getItems()
-- Fetch a client-safe view of all items (no server fields, no functions)
local clientItems = exports.ItemsDB:getClientItems()
-- Add or update an item
exports.ItemsDB:upsertItem({ name = 'testitem', label = 'Test Item', weight = 100 })
-- Remove an item
exports.ItemsDB:deleteItem('testitem')
-- Check if ItemsDB has finished loading
local ready = exports.ItemsDB:isReady()Notes
getItemandgetItemswait for ItemsDB to be ready before returning.upsertItemanddeleteItemautomatically sync changes to ox_inventory's liveItemListand broadcast to all connected clients. See Client Sync for details.