Setting up wardrobe

1

Go to config.lua

You can easily configure or add a new wardrobe to our script by accessing the following directory: brnx-iceorinksystem/modules/shared/config.lua. This file provides all the necessary options for customization, ensuring a seamless integration tailored to your needs.

2

Create control

Enabling the Wardrobe System

The wardrobe system allows players to access an extra storage or chest at specific map locations. It uses your framework's inventory system (e.g., ESX, QBCore, etc).

How to enable: In your config.wardrobe, set enabled = true. If you want to disable the system, simply set it to false or nil:

brnx-iceorinksystem\modules\config\config.lua
enabled = false

📍 You can add as many locations as you want, just separate them with commas.

Defining the Wardrobe Locations

The locations field inside config.wardrobe defines the map points where players will be able to access the wardrobe. Each entry requires:

  • coords: The coordinates (vector3(x, y, z)) of the location on the map.

  • distance: The maximum distance (in meters) from which the player can interact with it.

Example:

brnx-iceorinksystem\modules\config\config.lua
{
    coords = vector3(-160.2, -252.99, 44.09),
    distance = 3.0
}

📍 You can add as many locations as you want, just separate them with commas.

How it works and inventory integration

When a player approaches one of the wardrobe points defined in config.wardrobe.locations (within the set distance), the system attempts to open an extra storage — like a personal locker or chest.

How it works:

  • The system relies on your framework’s inventory support for creating or accessing extra chests.

  • The name, weight, and limits of this inventory depend on what’s defined in your base inventory system.

  • This storage is typically shared between all wardrobe points, unless separated by code logic.

  • Some inventories (like ox_inventory, qs-inventory, etc.) support custom chests tied to coordinates or names.

Requirements:

  • A compatible inventory system that supports external or dynamic storages.

  • Optional: extra configuration in your inventory resource (e.g., registering chest names, setting permissions, etc.).

Example using QBCore Inventory (qb-inventory)

The qb-inventory system is compatible with wardrobe, allowing the player to access a custom chest with a name, weight limit, and number of slots.

How it works:

When a player is near a wardrobe location and interacts with it, this function is called:

brnx-iceorinksystem\modules\config\config.lua
openWardrobe = function(source)
    exports['qb-inventory']:OpenInventory(source, 'iceorink', {
        label = 'Ice O Rink',
        maxweight = 15000,
        slots = 5
    })
end

Parameter breakdown:

  • source: The player’s ID.

  • 'iceorink': Inventory type (can be a custom name handled by your qb-inventory).

  • label: Name shown on the inventory UI.

  • maxweight: Maximum weight this chest can hold.

  • slots: Number of item slots available.

✅ You can fully customize the label, maxweight, and slots to match your server's design.

Last updated