Skip to content

ox_lib

Two touch-points; neither patches ox_lib internals.

Resources written around ox_lib conventions call log(source, event, message). The adapter in sdk/integrations/ox_lib/ox.lua has exactly that shape and forwards to cloud logs (dataset default). Drop the file next to the calling resource and require it:

local log = require "ox" -- wherever you placed ox.lua
log(source, "inventory", "Player opened a stash", itemName)

Under the hood it calls exports.spawnbase:Log("default", "info", …) with action set to the event and playerSource set when a source is given.

Handled inside the SDK itself — no adapter needed. In the spawnbase resource’s config.json, enable:

{
"logs": {
"oxInventoryEvents": { "enabled": true, "dataset": "ox_inventory" }
}
}

Inventory actions are then logged to that dataset whenever ox_inventory is started.