# Forge Money Module

## Overview
The Money module provides a comprehensive currency management system for the Forge client. It includes features for handling cash transactions, money transfers, and currency management across the client's various systems.

## Dependencies
- forge_client_main

## Authors
- J. Schmidt
- Creedcoder
- IDSolutions

## Features

### Cash Management
1. **Give Cash** (`fnc_giveCash.sqf`)
   - Handles giving cash to players
   - Validates transaction amounts
   - Updates player balances
   - Provides transaction feedback
   - Supports direct transfers

2. **Take Cash** (`fnc_takeCash.sqf`)
   - Manages cash removal from players
   - Validates available funds
   - Updates player balances
   - Provides transaction feedback
   - Supports direct deductions

3. **Cash Submission** (`fnc_giveCashSubmit.sqf`)
   - Processes cash transactions
   - Validates transaction data
   - Updates player balances
   - Handles transaction feedback
   - Manages transaction history

### Transaction Features
1. **Direct Transfers**
   - Player-to-player transfers
   - Amount validation
   - Balance verification
   - Transaction confirmation
   - Error handling

2. **Balance Management**
   - Real-time balance updates
   - Transaction history
   - Balance verification
   - Error prevention
   - Transaction logging

3. **Transaction Validation**
   - Amount verification
   - Player validation
   - Balance checks
   - Error handling
   - Transaction confirmation

## Event Handlers
The module uses several event handlers for initialization and execution:
- `XEH_preInit.sqf`: Pre-initialization setup
- `XEH_postInit.sqf`: Post-initialization tasks
- `XEH_preStart.sqf`: Pre-start configuration

## Usage
To use the money module:
```sqf
// Give cash to a player
[player, 1000] call forge_client_money_fnc_giveCash;

// Take cash from a player
[player, 500] call forge_client_money_fnc_takeCash;

// Submit a cash transaction
[player, 750, "Payment for services"] call forge_client_money_fnc_giveCashSubmit;
```

## Integration
The money module integrates with other Forge client systems:
1. **Bank System**
   - Wallet management
   - Account transfers
   - Balance synchronization
   - Transaction history

2. **Organization System**
   - Organization funds
   - Member payments
   - Transaction tracking
   - Balance management

3. **Admin System**
   - Administrative transfers
   - Balance modifications
   - Transaction oversight
   - System management

## Debugging
Debug mode can be enabled by uncommenting the following in `script_component.hpp`:
```cpp
#define DEBUG_MODE_FULL
```

## Version Information
Version information is managed through the main Forge client system configuration.

## Technical Details
- Real-time transaction processing
- Secure balance management
- Transaction validation
- Error handling
- User feedback
- Cross-module integration
- Event system integration
- State management
- Database persistence
- Transaction logging
- Balance verification
- Player validation 