Introduction
The RSG Framework features a comprehensive money system designed for RedM that includes multiple bank types, physical money items, and bloodmoney for illegal activities. Unlike traditional frameworks with a single bank account, RSG provides location-specific banks throughout the map. Version: 2.3.6+Core Features
๐ต Money Types
The framework supports 7 different money types:- cash - Physical money in hand (can be dropped/stolen)
- valbank - Valentine Bank account
- rhobank - Rhodes Bank account
- blkbank - Blackwater Bank account
- armbank - Armadillo Bank account
- bloodmoney - Illegal money from criminal activities
- bank - โ ๏ธ DEPRECATED (legacy, set to 0)
๐ฆ Physical Money Items
WhenEnableMoneyItems is true (default):
- cash becomes a physical inventory item (
dollar) - bloodmoney becomes a physical inventory item (
blood_dollar) - Players can see, drop, and trade physical money
- Money can be stolen from players when downed/robbed
๐ Money Logging
All money transactions are automatically logged:- Transactions over $100,000 trigger special high-value logging
- All AddMoney/RemoveMoney/SetMoney calls include reason tracking
- Integration with
rsg-logfor audit trails
How It Works
Money Storage
Money is stored in the playerโs data as a JSON object:Default Starting Money
Configured inrsg-core/config.lua:
Physical Money Items
Enable/disable inrsg-core/config.lua:
cashโdollaritem (weight: 1g each)bloodmoneyโblood_dollaritem (weight: 1g each)
rsg-core/shared/items.lua:
Player Money Functions
Add Money
Adds money to a playerโs account.moneytype(string) - Type of money (โcashโ, โvalbankโ, etc.)amount(number) - Amount to addreason(string) - Reason for logging (optional)
boolean - True if successful, false if failed
Example:
Money over $100,000 triggers special high-value logging for admin monitoring
Remove Money
Removes money from a playerโs account.moneytype(string) - Type of moneyamount(number) - Amount to removereason(string) - Reason for logging (optional)
boolean - True if successful, false if insufficient funds
Example:
Money types in
DontAllowMinus config cannot go below 0. Transaction will fail instead.Set Money
Sets a specific money amount (overwrites current value).moneytype(string) - Type of moneyamount(number) - New amountreason(string) - Reason for logging (optional)
boolean - True if successful, false if failed
Example:
Get Money
Gets the current amount of a specific money type.moneytype(string) - Type of money to check
number|boolean - Amount or false if invalid type
Example:
Money Configuration
Config Settings
Located inrsg-core/config.lua:
Money Item Configuration
Physical money behavior:- When player receives cash โ automatically converted to
dollaritem - When player spends cash โ
dollaritems are removed - Can drop/trade dollar items like any other inventory item
- Death/robbery can result in cash loss
Bank System
Location-Specific Banks
Each major town has its own bank:Why Multiple Banks?
- Realism: Players must travel to specific towns to access their accounts
- Gameplay: Creates opportunities for bank robberies and escorts
- Economy: Different regions can have different banking features
- Risk: Traveling with cash adds danger and roleplay opportunities
Bank Account Management
Bloodmoney System
What is Bloodmoney?
Bloodmoney is illegal currency obtained through:- Store/bank robberies
- Drug sales
- Gang activities
- Stolen goods fencing
Bloodmoney Features
- Separate Currency: Cannot be deposited in legitimate banks
- Physical Item: Appears as
blood_dollarwhen money items enabled - Illegal Use: Used for black market purchases
- Risk Factor: Can be confiscated by law enforcement
Using Bloodmoney
Money Events
Server Events
Listen for money changes in your resources:Client Events
Complete Examples
Example 1: Paycheck System
Example 2: ATM/Bank UI
Example 3: Money Drop on Death
Best Practices
Include descriptive reasons: Always provide a reason parameter for audit logging and debugging
Common Patterns
- Check before removing:
- Handle failures:
- Use appropriate money type:
Troubleshooting
Money not saving
Money not saving
Check that player data is being saved correctly. Money is saved as JSON in the
money column of the players table.Physical money items not working
Physical money items not working
Verify
RSGConfig.Money.EnableMoneyItems = true in config.lua and ensure dollar and blood_dollar items exist in shared/items.luaCan't use 'bank' money type
Can't use 'bank' money type
The โbankโ type is deprecated. Use location-specific banks: valbank, rhobank, blkbank, or armbank
Money going negative
Money going negative
Check
DontAllowMinus config array. Money types in this list cannot go below 0.Migration from Old Bank System
If migrating from an older framework with single โbankโ type:Next Steps
- Player Data Reference - Learn about PlayerData structure
- Configuration Guide - Configure money settings
- Server Functions - All money-related functions
Need help? Join the RSG Framework Discord!