Files

23 lines
846 B
Lua
Raw Permalink Normal View History

2026-03-29 21:41:17 +03:00
local function createLog(value, type)
exports[Luxu.resourceName]:addLog(type, value)
end
-- =============
-- INVENTORY LOGS
-- =============
AddEventHandler('ox_inventory:openedInventory',
function(playerId, inventoryId)
local inventory = exports.ox_inventory:GetInventory(inventoryId, false)
if inventory.type == 'stash' then
createLog(("player %s opened stash %s"):format(playerId, inventoryId), "inventory")
elseif inventory.type == 'player' then
createLog(("player %s opened player inventory %s"):format(playerId, inventoryId), "inventory")
end
end)
AddEventHandler('ox_inventory:usedItem', function(playerId, name, slotId, metadata)
createLog(("player %s used item %s in slot %s with metadata %s"):format(playerId, name, slotId, metadata),
"inventory")
end)