Pawn
A comprehensive, fully-featured pawnshop system for FiveM with dynamic economy, multi-shop support, and a modern React UI.
#Features
- Multi-Shop Support - Create unlimited pawnshops across the map
- Ownership System - Players can buy/sell shops with full management
- Employee Management - Hire/fire employees with role-based access
- Admin-Controlled Pricing - Global whitelist prices and dirty-to-clean conversion are set by admins
- Dual Shop Accounts - Every pawn shop tracks a dirty reserve and a clean balance
- Dirty Money Flow - Customer purchases and customer payouts use dirty money
- Dynamic Economy - Market prices still fluctuate based on supply/demand
- Quality-Based Pricing - Item quality affects value
- Market Charts - Visual price history with Recharts
- Transaction Logging - Full audit trail of all activities
- Modern UI - React + Tailwind CSS interface
- Framework Agnostic - Works with Qbox, QBCore, ESX, or Standalone
#Dependencies
#Installation
#Automatic Installation (Recommended)
- Download & Extract - Place
gr1m_pawnin your resources folder - Build the UI:
cd resources/gr1m_pawn/web - Add to server.cfg:
ensure ox_lib ensure oxmysql ensure ox_inventory ensure ox_target ensure gr1m_pawn - Start your server - The database tables will be created automatically!
#Manual SQL Installation (Optional)
If auto-install fails or you prefer manual control:
# Import install.sql into your database manually
mysql -u root -p your_database < install.sql
#Post-Installation
- Configure shops in
config.lua- Set locations, prices, NPCs - Set up ACE permissions (optional):
add_ace group.admin command.pawnshop_admin allow add_ace group.admin command.pawnshop_create allow
#Commands
| Command | Description | Permission |
|---|---|---|
/pawnshop_reinstall | Force database reinstallation | Admin |
/pawnshop_updateprices | Manually trigger price update | Admin |
/pawnshop_create [name] | Create new shop at location | Admin |
/pawnshop_delete [shopId] | Delete a shop | Admin |
#Default Locations
Three pawnshops are pre-configured:
- Los Santos Pawn & Jewelry - City, $50,000
- Sandy Shores Trading Post - Sandy Shores, $25,000
- Paleto Bay Pawn Brokers - Paleto, $30,000
#Configuration
#Economy Settings (config.lua)
Config.Economy = {
fluctuationInterval = 30, -- Price update interval (minutes)
maxPriceDeviation = 0.5, -- Max 50% price deviation
supplyDemand = {
priceDropPerBatch = 0.02, -- 2% price drop per 10 items
batchSize = 10,
maxPriceDrop = 0.5,
priceRisePerBatch = 0.03, -- 3% price rise when low stock
lowStockThreshold = 5,
maxPriceRise = 0.5,
},
profitMargins = {
minBuyMargin = 0.5, -- Shop buys at 50% minimum
maxBuyMargin = 0.9, -- Shop buys at 90% maximum
minSellMargin = 1.1, -- Shop sells at 110% minimum
maxSellMargin = 2.0, -- Shop sells at 200% maximum
}
}
#Adding Items
Edit Config.ItemCategories in config.lua:
['jewelry'] = {
items = {
['diamond_ring'] = {
basePrice = 2500,
volatility = 0.15 -- Price fluctuation amount
},
}
}
#Blacklisting Items
Items that cannot be pawned:
Config.BlacklistedItems = {
'id_card',
'phone',
-- etc
}
#How It Works
#For Players
- Browse Shop - View available items with current prices
- Sell Items - Sell from inventory with quality affecting price
- Buy Items - Purchase from shop stash
- View Trends - See price history charts
#For Shop Owners
- Purchase Shop - Buy unowned shops via target interaction
- Manage Settings - Adjust shop identity, requirements, and transaction rules
- Manage Accepted Items - Choose which approved stolen goods the pawn broker ped will accept
- Deposit Dirty Money - Stock the shop's dirty reserve and credit the configured clean percentage
- Withdraw Clean Cash - Pull laundered clean money out of the shop
- View Logs - Full transaction history
#Economy System
- Supply Impact - More stock = lower buy prices
- Demand Impact - Low stock = higher sell prices
- Market Fluctuation - Random price changes every 30 minutes
- Quality Factor - 0-100% quality scales price from 10%-100%
#Troubleshooting
#Database Issues
If auto-install fails:
# Check if tables exist
SELECT * FROM information_schema.tables
WHERE table_schema = 'your_database'
AND table_name LIKE 'pawnshop%';
# Run manual install
mysql -u root -p your_database < install.sql
#UI Not Loading
- Check build exists:
web/build/index.html - Check browser console for errors
#Items Not Showing
- Verify item exists in ox_inventory
- Check item is not in
Config.BlacklistedItems - Ensure
Config.ItemCategorieshas pricing info
#Support
For issues and feature requests, please use the GitHub issues page.
#License
MIT License - Feel free to modify and distribute.
GR1M