Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Script FourTwenty DynMarket - Dynamic Market System & Real-time Economy

kirateckhttp

Bronze Elite
Joined
May 4, 2025
Messages
14
Reaction score
88
Points
221
Location
Francais

a3ef9dee4a643bc77bbd6296c4b9a5bc3bda8817.jpeg


Introduction​

Hey FiveM Community!
:wave:

We’re FourTwenty, and we’re excited to share our advanced dynamic market system! This resource brings unlimited customizable markets to your server with real-time price fluctuations, modern NUI interface, and an engaging economy system. Perfect for servers looking to add dynamic trading and economic gameplay!

Core Features​

Advanced Economic System
:bar_chart:

  • Dynamic Supply & Demand
    • Prices react to player trading activity
    • Market prices decrease when items are sold frequently
    • Prices recover over time when items aren’t being sold
    • Configurable impact rates and recovery speeds
    • Prevents exploitation through smart price balancing
  • NEW: Counter-Item System
    :new:
    • Define items that influence other items’ prices
    • Example: When players craft/sell burgers, burger ingredient prices increase
    • Simulates real market dependencies
    • Optional per-item configuration
    • Creates meaningful economic loops
  • -- Example Configuration
    {
    name = "Burger Bun",
    item = "ing_bread",
    basePrice = 100,
    counterItem = "burger", -- Optional: Define a counter item
    counterEffect = 0.05 -- 5% price increase per counter item
    }

Dynamic Price System
:chart_with_upwards_trend:

  • Real-time Price Fluctuations
    • Base random fluctuations within set boundaries
    • Supply & Demand impact
    • Counter-item effects
    • Time-based recovery
  • Visual Trend Indicators
    • Up/down arrows for price trends
    • Color-coded price changes
    • Supply level indicators
  • Configurable Parameters
    • Set minimum/maximum prices
    • Adjust fluctuation ranges
    • Configure update intervals
  • Price History
    • Track price changes
    • Monitor market trends
    • Analyze economic patterns

Market Management
:convenience_store:

  • Unlimited Market Creation
    • Food Markets
    • Resource Traders
    • Fish Markets
    • Pawnshops
    • Custom market types
  • Individual Market Settings
    • Custom locations
    • Unique NPC configurations
    • Market-specific price rules
    • Category organization
  • Visual Customization
    • Custom map blips
    • Market markers
    • NPC appearance
    • UI themes

Modern Interface
:computer:

  • Clean Design
    • Responsive dark theme
    • Intuitive layout
    • Smooth animations
  • Real-time Updates
    • Live price changes
    • Supply level indicators
    • Market trend visualization
  • User-Friendly Features
    • Category filtering
    • Bulk item selection
    • Quick sell options
    • Inventory management

How It Works​

Supply & Demand System​

  1. Base Price Mechanics
    • Every item has a configurable base price
    • Prices fluctuate randomly within set boundaries
    • Supply & Demand modifies these base calculations
  2. Supply Impact
    • Each sale decreases item prices
    • Impact is configurable per market
    • Automatic price recovery over time
  • supplyDemand = {
    enabled = true,
    impact = {
    sale = 0.02, -- 2% price decrease per sale
    recovery = 0.01, -- 1% recovery when not sold
    maximum = 0.40 -- Maximum 40% impact
    }
    }

  • Counter-Item System
    • Optional feature for creating economic dependencies
    • When counter-items are sold/crafted, base item prices increase
    • Example: Selling processed items (like burgers) increases ingredient prices
    • Fully configurable effect strength and duration
  • items = {
    {
    name = "Salmon",
    item = "fish_salmon",
    basePrice = 85,
    counterItem = "sushi", -- Optional counter item
    counterEffect = 0.04 -- 4% price increase per sushi
    }
    }

  • Price Calculation
  1. Final Price = Base Price × (1 + Random Fluctuation) × (1 - Supply Impact + Counter Effect)
    • All factors are configurable
    • Built-in limits prevent extreme prices
    • Automatic balancing system

Market Configuration Example​



["fish_market"] = {
enabled = true,
name = "Fish Market",
blip = {
sprite = 356,
color = 59,
scale = 0.8
},
location = {
coords = vector3(-1816.5, -1193.8, 14.3),
heading = 319.0,
npcModel = "s_m_m_linecook"
},
priceSettings = {
minMultiplier = 0.6,
maxMultiplier = 1.8,
maxChangePercent = 20,
supplyDemand = {
enabled = true,
impact = {
sale = 0.02,
recovery = 0.01,
maximum = 0.40
}
}
},
items = {
{
name = "Salmon",
item = "farm_salmon",
basePrice = 85,
category = "Premium Fish",
counterItem = "sushi",
counterEffect = 0.04
}
-- Add more items...
}
}

Performance​

  • Resource Usage
    • 0.0ms when inactive
    • 0.01-0.02ms when active
  • Optimization Features
    • Smart distance checks
    • Efficient database queries
    • Event batching
    • Price calculation optimization
    • Memory usage optimization

Technical Details​



Code is accessible Yes
Subscription-based No
Lines of code ~1500+
Requirements ESX, oxmysql
Support Yes
Version 1.2.0

Installation​

  1. Download from GitHub
  2. Add to your resources folder
  3. Import SQL file:
  • fourtwenty_market_prices.sql

  • Add to server.cfg:
  1. ensure fourtwenty_dynmarket

  2. Configure in config.lua
  3. Restart your server

Documentation​

  • GitHub Wiki
    • Complete installation guide
    • Configuration examples
    • API documentation
    • Troubleshooting guide
  • Discord Support
    • Active community
    • Direct developer support
    • Regular updates
    • Feature requests

Links​

Updates & Support​

  • Regular feature updates
  • Bug fixes
  • Community-driven development
  • Active Discord support
  • Open to suggestions
a3ef9dee4a643bc77bbd6296c4b9a5bc3bda8817.jpeg
 

Attachments

  • dynmarket-main.zip
    60.7 KB · Views: 44
Top