JDB-NET Trading

JDB-NET Trading

GBP 5.99

Video

Screenshots

JDB-NET Trading is a player-driven economy system for FiveM (Qbox). Unlike traditional shops, stock is entirely dynamic; items sold by players to a specific trader become the inventory available for others to buy. Utilising the ox_inventory stash system, it provides a realistic, localised marketplace with a sleek Material Design 3 interface.

⚖️ Key Features

  • Dynamic Economy: Global stock is player-dependent. Items sold at a location are stored in a dedicated stash for that trader, which other players can then purchase.

  • Location-Specific Markets: Define unique traders with their own ped models, map blips, and specific item lists.

  • Modern NUI: Material Design 3 interface featuring dedicated Buy and Sell tabs, quantity inputs, and a customisable accent colour.

  • Stash Integration: Uses ox_inventory stashes to manage stock, ensuring persistence and reliability.

  • Customisable Blips: Set unique sprites, colours, and scales for every trader on the map.

  • Transaction Control: Configure whether transactions use cash or bank accounts globally.

🛠️ Configuration

  • shared/config.lua: Central hub for global settings and location definitions.

  • Global Options: Customise AccentColour, MoneyType (cash/bank), and stash limits (StashSlots / StashMaxWeight).

  • Location Setup: Define traders with an id, pedModel, coords, and a specific items table containing unit prices.

📦 Dependencies

  • qbx_core

  • ox_lib

  • ox_target

  • ox_inventory

🚀 Quick Start

  1. Ensure the resource folder is named jdbnet-trading.
  2. Add ensure jdbnet-trading to your server.cfg.
  3. Define Items: Ensure any items you wish to trade are registered in ox_inventory/data/items.lua.
  4. Add Locations: Example trader configuration in shared/config.lua:
{
    id = 'ls_commodities',
    label = 'LS Commodities Trader',
    coords = vector4(24.47, -1346.62, 29.49, 271.66),
    pedModel = 'a_m_m_business_01',
    blipSprite = 52,
    blipColor = 2,
    blipScale = 0.8,
    items = {
        ['iron_ore'] = 50,
        ['copper_ore'] = 75,
        ['gold_ore'] = 200,
    },
},

🎮 Usage

  1. Interact: Approach a trader and use ox_target to open the menu.
  2. Sell: The Sell tab displays valid items from your inventory. Select a quantity to trade them for currency.
  3. Buy: The Buy tab shows items currently in the trader's stock (items previously sold by players).