Meta Bags
Meta Bags is a fully-featured backpack and inventory system for FiveM servers. It integrates with ox_inventory and provides visual wearable backpacks, lockable bags, and prop-based items.
Meta Bags
Meta Bags is a fully-featured backpack and inventory system for FiveM servers. It integrates with ox_inventory and provides visual wearable backpacks, lockable bags, and prop-based items.
Table of Contents
- Requirements
- Installation
- Configuration
- Bag Setup
- Integrating with Clothing Menus
- Lockable Bags
- Whitelist & Blacklist Items
Requirements
- FiveM server running ox_inventory.
- Optional: Clothing system (e.g., illenium-appearance) for wearable backpack integration.
- Basic knowledge of Lua scripting for customizing bag properties.
Installation
- Place the MetaBag resource folder into your server’s
resourcesdirectory. - Ensure
ox_inventoryis installed and started before MetaBag in yourserver.cfg:
- Start your server.
Configuration
The config file is located at config.lua. Key options:
Bag Definition
Each bag object can have the following fields:
| Field | Type | Description |
|---|---|---|
metaID | string | Unique identifier for the bag. |
slots | number | Number of inventory slots the bag provides. |
weight | number | Maximum weight the bag can carry. |
cloth | table | Optional clothing components for male/female characters. |
prop | table | Optional prop attachment for non-clothing items. |
locked | boolean | Determines if the bag is initially locked. |
hasLock | boolean | Allows locking/unlocking with a PIN. |
whitelist | table | Optional list of allowed item types. Cannot be used with blacklist. |
blacklist | table | Optional list of blocked item types. Cannot be used with whitelist. |
Inventory Item (ox_inventory ONLY)
Example Bag (Clothing-Based)
Example Bag (Prop-Based)
Integrating with Clothing Menus
MetaBag allows certain clothing items to be blocked when a bag is equipped to prevent clipping or incompatible outfits.
Using BagBlocked State
This disables attached props and components while in your desired clothing menu. Example implementation provided for illenium-appearance.
Navigate to OpenShop function found in illenium-appearance/client/client.lua.
- Add LocalPlayer.state:set('BagBlocked', true, false) at the top of the function.
- Add LocalPlayer.state:set('BagBlocked', false, false) at the end of the function.
This ensures the bags do not become saved as player outfits. Additional integration may be required depending on how your clothing menu works.
Meta Data items for shops
See the example below of proper metadata configuration of a for sale item. This is an example ox inventory shops item. You can make the bags available in any inventory that supports meta data. My reccomendation is fd_shops. See felis.gg
Reload Skin
Most clothing systems have a reload skin option available. To avoid sync issues you can listen for these events. See example for illenium-apppearance in env_metabags/open/illenium.lua. Clear all wearables and after a short wait you can equipBagsFromInventory to reset the player ped at the time the refresh occurs.
Lockable Bags
Some bags can have a PIN lock. See the Example Bag above for reference of how to enable/disable a lockable bag.
- Players need to enter the correct PIN to access the bag’s inventory.
- Lockpick items can be used to bypass locks if configured.
Rollable Bags
You can configure specific bags to be rollable. When bags are rolled they will not trigger prop/component changes. You cannot roll a bag with items in it and you cannot place items into a rolled bag. See the Example Bag section above for reference of how to enable/disable a rollable bag.
Whitelist & Blacklist Items
Meta Bags supports controlling what items a bag can carry:
- Whitelist: Only listed items are allowed in the bag.
- Blacklist: Items listed cannot be stored in the bag.
Only one of whitelist or blacklist can be applied per bag.

