lock-aDXS Inventory Logs

Installation

  1. Place the resource in your server resources folder with the folder name:

    • resources/[dxs]/dxs_inventorylogs

  2. Ensure that ox_inventory and ox_lib are installed and started correctly.

  3. Add this line to your server.cfg after the dependencies:

    • ensure dxs_inventorylogs

  4. Restart the server.

Configuration

All basic settings can be found in the config.luaarrow-up-right file.

  • Config.Debug

    • Set to true to see extra debug messages in the console.

  • Config.Framework

    • 'ESX', 'QBCore', or 'auto'

    • In 'auto' mode, the script automatically detects the es_extended / qb-core resource.

  • Config.Webhooks

    • You can set different webhook URLs for different actions:

      • default (fallback)

      • itemAdded, itemRemoved

      • give, drop, pickup

      • shop

      • stash, glovebox, trade

    • Any empty category will use the default webhook.

    • Important: Paste your own Discord webhook URLs here. Never keep real webhooks in a public repo.

  • Config.Colors

    • Discord embed color codes (in decimal):

      • add (green)

      • remove (red)

      • move (blue)

      • warning (yellow)

  • Config.BotName and Config.BotAvatar

    • The bot name and avatar URL displayed in the Discord embed.

Events Covered (ox_inventory hooks)

The script uses ox_inventory:registerHook to listen for these events:

  • swapItems

    • Player to player give

    • Player to drop / stash / trunk / glovebox

    • Drop / stash / trunk / glovebox to player

    • Generic item move in/out

  • buyItem

    • Shop item purchases (with price, currency, shopId)

  • createItem

    • Item added to inventory via Admin / script

  • removeItem

    • Admin / script remove or item usage

By default, each embed includes this info:

  • Player character name + server ID

  • Item label + quantity

  • Context-specific fields:

    • Drop coords

    • Vehicle plate (trunk / glovebox)

    • Stash name / ID

    • Shop ID

Usage Tips

  • If you only want basic logging, setting the default webhook is sufficient.

  • If you want detailed channels (e.g., separate channels for drops, shops, trades), use different webhooks for each category.

  • Keep debug mode true only during testing; keep it false in production.

Credits

  • Script: DXS (see author in fxmanifest)

  • Dependencies: ox_inventory, ox_lib

Last updated