Turn one usable item into one or more reward items with animation + progress bar support.
This resource is framework/inventory-agnostic through community_bridge and is built for common FiveM roleplay stacks.
- Registers all items in
Config.ItemsToConvertas usable items. - Plays a client animation with a held prop while opening.
- Supports fixed rewards and random reward pools.
- Supports amount ranges (example:
{8000, 12000}). - Optional job restriction per openable (starter kits, etc.).
- Optional anti-spam cooldown and inventory space checks.
- Optional debug and server-side conversion logging.
- Startup config validation + version check.
- FiveM server (Cerulean)
community_bridge- A compatible framework via bridge (
qb,qbox,esx, or standalone mode) - A compatible inventory module (auto-detected by bridge/manual config)
- Place this resource in your server resources folder.
- Ensure
community_bridgestarts before this resource. - Add to your server config:
ensure community_bridge
ensure gldnrmz-openables- Configure conversions in
config.lua. - Restart the resource/server.
All settings are in config.lua.
Config.Framework:auto,qb,qbox,esx,noneConfig.Inventory:auto,ox_inventory,framework,noneConfig.EnableLogging: print conversion logs in server consoleConfig.EnableRateLimit: enable anti-spam cooldownConfig.GlobalCooldown: cooldown in millisecondsConfig.CheckInventorySpace: verifies carry capacity before consuming openableConfig.CheckItemExists: basic validation for configured reward namesConfig.JobWhitelistEnabled: enforcejobfield on conversion entriesConfig.PreLoadModels: toggles preload behavior message/model flowConfig.Debug: extra debug output
Each object in Config.ItemsToConvert supports:
usedItem(string): item that gets consumedjob(string, optional): required job to use this conversionprop(table): model + animation + attachment settingsgivenItems(table): reward definition
givenItems can be either:
- Static list (every entry can have
chance) - Random pool mode using:
random = trueitems = <number to pick>- reward entries with optional
chance
Reward amount supports:
- Fixed:
amount = 5 - Random range:
amount = {min, max}
{
usedItem = "giftbox",
prop = {
model = "xm3_prop_xm3_present_01a",
bone = 60309,
propPlacement = { x = 0.1, y = 0.0, z = 0.0, rotX = -90.0, rotY = 90.0, rotZ = 0.0 },
animation = { dict = 'mp_arresting', anim = 'a_uncuff', flags = 1 },
},
givenItems = {
random = true,
items = 3,
{ givenItem = "lockpick", amount = 4, chance = 50 },
{ givenItem = "cash", amount = {4000, 7000}, chance = 25 },
}
}- Player uses
usedItem. - Server checks cooldown/job/inventory space.
- Item is removed.
- Client plays 5s opening animation + prop.
- Rewards are granted after the progress completes.
- If inventory is full, the openable is not consumed.
chanceaccepts either percent-style values (25) or decimal (0.25).- For random mode, pools are pre-calculated at startup and fallback-calculated if needed.
- "community_bridge is not ready"
- Ensure
community_bridgeis installed and started before this resource.
- Ensure
- Openable does nothing
- Confirm the
usedItemexists in your item database and is registered as usable through the bridge.
- Confirm the
- No rewards received
- Check inventory space and verify reward item names exist in your inventory/framework.
- Job restricted item fails
- Confirm player job exactly matches the conversion
jobvalue.
- Confirm player job exactly matches the conversion
Current resource version: 1.0.0