Item Setup

When using Config.DiceMode = 'item' or 'both', you need to add dice items to your inventory system.

Available Items

Item Name
Label
Description

dice_white_1

1 White Die

Roll 1 white die

dice_white_2

2 White Dice

Roll 2 white dice

dice_white_3

3 White Dice

Roll 3 white dice

dice_black_1

1 Black Die

Roll 1 black die

dice_black_2

2 Black Dice

Roll 2 black dice

dice_black_3

3 Black Dice

Roll 3 black dice

dice_red_1

1 Red Die

Roll 1 red die

dice_red_2

2 Red Dice

Roll 2 red dice

dice_red_3

3 Red Dice

Roll 3 red dice

Included Files

The install/ folder contains ready-to-use files:

File
Purpose

install/items.lua

ox_inventory item definitions

install/images/

9 item icons (PNG)

Item Images

file-archive
1MB

ox_inventory Setup

Quick Install

1

Open install/items.lua

2

Copy all contents

3

Paste into ox_inventory/data/items.lua

4

Copy all images from install/images/

5

Paste into ox_inventory/web/images/

6

Restart server or refresh inventory

Item Definitions

Add to ox_inventory/data/items.lua:

QBCore Setup

Item Definitions

Add to qb-core/shared/items.lua:

Images

Copy images from install/images/ to your QBCore inventory's image folder:

  • qb-inventory/html/images/ (default qb-inventory)

  • Or your custom inventory's image location

ESX Setup

Registering Items

For ESX, items are typically added to your database. The script will auto-register useable items on startup.

Add to your items database table:

Images

Copy images to your ESX inventory's image folder.

Item Behavior

ConsumeItem Setting

Setting
On Use
On Pickup

true

Item removed

Item returned

false

Item stays

Nothing

Anti-Exploit Protection

The server validates all item returns:

  • Only the item you used can be returned

  • Only one return per roll

  • Cleared on disconnect or new roll

Giving Items (Admin)

ox_inventory

QBCore

ESX

Troubleshooting

chevron-rightItems not workinghashtag
  • Verify Config.DiceMode is 'item' or 'both'

  • Check server console for inventory system detection message

  • Ensure items are properly added to your inventory system

chevron-rightImages not showinghashtag
  • Verify images are in correct folder

  • Check image filenames match exactly (case-sensitive)

  • Refresh/restart inventory resource

chevron-rightItems not consumedhashtag
  • Check Config.ConsumeItem setting

  • For ox_inventory, ensure close = true in item definition

Last updated