๐ชGlobal Shop
A comprehensive marketplace system for FiveM servers that allows players to buy and sell items through a global marketplace interface.
Features
Global marketplace system with real-time updates
Support for multiple frameworks (ESX and QB-Core)
Support for multiple inventory systems (ox_inventory, core_inventory, qs-inventory, codem-inventory)
Transaction fee system with configurable rates
Item metadata support
Blacklist system for restricted items
Multiple market locations with blips
Transaction history tracking
Balance system for sellers
Multi-language support
Modern and responsive UI
Installation
Download the resource
Import the
sql/marketplace.sql
file into your databaseAdd the following to your server.cfg:
ensure hate-globalshop
Configuration
Framework Selection
Config.Framework = "QB" -- Options: "ESX" or "QB"
Inventory System
Config.Inventory = "ox_inventory" -- Options: "ox_inventory", "core_inventory", "qs-inventory", "codem-inventory"
Market Locations
Config.MarketLocations = {
{
coords = vector3(720.18, 1278.09, 360.3),
radius = 3.0 -- Distance in meters player needs to be within
}
-- Add more locations as needed
}
Transaction Fee Settings
Config.TransactionFee = 10 -- Percentage fee taken from each sale (e.g., 10 means 10%)
Config.EnableFee = true -- Set to false to disable transaction fees
Config.FeeAccount = nil -- Set to a player identifier to direct all fees to this account
Currency Settings
Config.CurrencySymbol = "ึึ " -- Currency symbol to display
Config.CurrencySymbolPosition = "before" -- 'before' or 'after' the amount
Item as Money System
Config.UseItemAsMoney = false -- Set to true to use items as currency
Config.MoneyItem = "tuning_component" -- The item to use as currency
Blacklisted Items
Config.BlacklistedItems = {
"weapon_pistol",
"loot_dvd",
"black_money",
"lockpick",
"advancedlockpick"
}
Language Settings
Config.Language = "en" -- Default language (en, tr, de, etc.)
Exports
Client Exports
-- Open the marketplace
exports['hate-globalshop']:openMarket()
-- Returns true if market opened successfully, false otherwise
-- Check if player can open the market
exports['hate-globalshop']:canOpenMarket()
-- Returns true/false and message explaining why market can't be opened
exports['hate-globalshop']:GetMarketBalance()
-- Returns the player's current market balance
exports['hate-globalshop']:GetPlayerInventory()
-- Returns the player's current inventory items
Server Exports
-- Open the marketplace for a specific player
exports['hate-globalshop']:openPlayerMarket(playerId)
-- Opens the market for the specified player
exports['hate-globalshop']:GetMarketBalance(source)
-- Returns a player's market balance by source
exports['hate-globalshop']:GetPlayerInventory(source)
-- Returns a player's inventory by source
Events
Client Events
-- Open the marketplace
TriggerEvent('hate-globalshop:openMarket')
-- or
TriggerEvent('hate-globalshop:client:openMarket')
Server Events
-- Open the marketplace for a specific player
TriggerEvent('hate-globalshop:server:openMarket', playerId)
-- Open the marketplace for the triggering player
TriggerEvent('hate-globalshop:server:openMarket')
Commands
Player Commands
/globalmarket -- Open the marketplace interface (default key binding: F6)
Notes
The script is protected with escrow encryption
Client and server files are encrypted
Only config.lua, server/framework.lua, and client/marketplace.lua are accessible for customization
The script supports multiple inventory systems and frameworks
Transaction fees can be configured and directed to specific accounts
The marketplace supports item metadata preservation
Security Notice
This script is protected by FiveM's escrow system. The client and server-side code is encrypted and cannot be modified.
Last updated