Skip to main content

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+
The legacy bank money type is DEPRECATED and set to 0 by default. Use location-specific banks instead!

Core Features

๐Ÿ’ต Money Types

The framework supports 7 different money types:
  1. cash - Physical money in hand (can be dropped/stolen)
  2. valbank - Valentine Bank account
  3. rhobank - Rhodes Bank account
  4. blkbank - Blackwater Bank account
  5. armbank - Armadillo Bank account
  6. bloodmoney - Illegal money from criminal activities
  7. bank - โš ๏ธ DEPRECATED (legacy, set to 0)

๐Ÿฆ Physical Money Items

When EnableMoneyItems 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-log for audit trails

How It Works

Money Storage

Money is stored in the playerโ€™s data as a JSON object:

Default Starting Money

Configured in rsg-core/config.lua:

Physical Money Items

Enable/disable in rsg-core/config.lua:
When enabled:
  • cash โ†’ dollar item (weight: 1g each)
  • bloodmoney โ†’ blood_dollar item (weight: 1g each)
Item definitions in rsg-core/shared/items.lua:

Player Money Functions

Add Money

Adds money to a playerโ€™s account.
Parameters:
  • moneytype (string) - Type of money (โ€˜cashโ€™, โ€˜valbankโ€™, etc.)
  • amount (number) - Amount to add
  • reason (string) - Reason for logging (optional)
Returns: 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.
Parameters:
  • moneytype (string) - Type of money
  • amount (number) - Amount to remove
  • reason (string) - Reason for logging (optional)
Returns: 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).
Parameters:
  • moneytype (string) - Type of money
  • amount (number) - New amount
  • reason (string) - Reason for logging (optional)
Returns: boolean - True if successful, false if failed Example:
SetMoney completely overwrites the current amount. Use AddMoney/RemoveMoney for relative changes.

Get Money

Gets the current amount of a specific money type.
Parameters:
  • moneytype (string) - Type of money to check
Returns: number|boolean - Amount or false if invalid type Example:

Money Configuration

Config Settings

Located in rsg-core/config.lua:

Money Item Configuration

Physical money behavior:
  • When player receives cash โ†’ automatically converted to dollar item
  • When player spends cash โ†’ dollar items 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?

  1. Realism: Players must travel to specific towns to access their accounts
  2. Gameplay: Creates opportunities for bank robberies and escorts
  3. Economy: Different regions can have different banking features
  4. 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_dollar when 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

Always validate before transactions: Check if player has sufficient funds before attempting to remove money
Use the deprecated โ€˜bankโ€™ type carefully: Itโ€™s set to 0 by default. Migrate to location-specific banks
Include descriptive reasons: Always provide a reason parameter for audit logging and debugging

Common Patterns

  1. Check before removing:
  1. Handle failures:
  1. Use appropriate money type:

Troubleshooting

Check that player data is being saved correctly. Money is saved as JSON in the money column of the players table.
Verify RSGConfig.Money.EnableMoneyItems = true in config.lua and ensure dollar and blood_dollar items exist in shared/items.lua
The โ€˜bankโ€™ type is deprecated. Use location-specific banks: valbank, rhobank, blkbank, or armbank
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


Need help? Join the RSG Framework Discord!