Trader Shop System
Overview
Hate-Traders is a comprehensive trading system for FiveM servers that allows players to buy and sell items through various trading locations. The script supports different market types (traders, fence, black market) and includes features like stock management, multilingual support, and customizable NPCs.
Features
Multiple Market Types: Configure different types of markets (traders, fence, black market)
Stock Management: Each item has its own stock that replenishes over time
Item Metadata Support: Items can have metadata like durability, registration status, etc.
Multilingual Support: Built-in support for English, Turkish, and German languages
Dynamic UI: Modern and responsive NUI interface with dynamic content generation
Framework Support: Compatible with both QBCore and ESX frameworks
NPC & Blip Customization: Fully customizable NPCs and map blips
Category System: Items can be organized into categories for easy navigation
Installation
Requirements
QBCore or ESX Framework
oxmysql
Setup Instructions
Download and Extract
Download the resource and extract it to your server's resources folder
Ensure the folder is named
hate-traders
Database Setup
The script will automatically create required database tables on first start
Required table:
market_stocks
Configure the Script
Open
config.lua
to customize market locations, items, and settingsSet
Config.Framework
to either "qbcore" or "esx" depending on your serverSet
Config.Locale
to your desired language ("en", "tr", or "de")
Add to Server.cfg
Add
ensure hate-traders
to your server.cfg file
Restart Your Server
Restart your server for the changes to take effect
Configuration
Main Configuration Options
Market Location Setup
Each market location can be configured with these properties:
Item Configuration
Items can be configured with these properties:
Exports
The script provides the following exports that can be used by other resources:
Client-side Exports
OpenMarket Opens a specific market type
CloseMarket Closes the currently open market
Language Support
The script includes complete translations for English, Turkish, and German languages. You can change the active language by modifying the Config.Locale
setting in the config.lua file.
To add a new language, you can create a new entry in the languages.lua
file following the existing language structure.
Customization
Adding New Items
To add new items to the markets, add them to the respective market type in the Config.Items
table.
Creating New Market Types
You can create new market types by adding a new key to the Config.Items
table and then adding locations with that type.
Custom Currency System
The script uses item-based currency by default. The main currency item is defined in Config.MoneyItem
.
Advanced Features
Stock System
Each item has its own stock that is tracked server-side and stored in the database. Stocks automatically replenish over time based on the Config.StockUpdateInterval
setting.
Item Metadata
When configuring items, you can add metadata that will be transferred to the player's inventory when they purchase the item. This can include properties like:
Durability
Serial numbers
Registration status
Any other custom properties
Troubleshooting
Common Issues
Items not appearing in the shop
Ensure the item exists in your server's shared items list
Check that the market type is correctly configured
NPCs not spawning
Verify that
Config.EnablePeds
is set to trueCheck that the NPC models are valid and available on your server
Translation issues
Make sure the language key in
Config.Locale
matches one of the available languagesCheck if the translation key exists in the selected language
Support
For additional support, please refer to the official documentation or contact the developer.
Note: This script has encrypted client and server files. The documentation only covers the available exports and configuration options.
Last updated