client/addons/bank/README.md
Jacob Schmidt 9936d6ddc3
All checks were successful
Build / Build (push) Successful in 28s
feat: Enhance module documentation and features
This commit updates the documentation for several Forge modules, adding comprehensive details about their functionalities, user interfaces, and integration with other systems. Key enhancements include:

- Expanded descriptions for the Admin, Arsenal, Bank, Garage, Interaction, Locker, Medical, Organization, Service, Store, and other modules.
- Added new features such as financial operations, user interface improvements, and integration with organization systems.
- Improved clarity on usage instructions and configuration options across modules.

These changes aim to provide better guidance for users and developers interacting with the Forge client system.
2025-05-25 16:03:03 -05:00

123 lines
3.8 KiB
Markdown

# Forge Bank Module
## Overview
The Bank module provides a comprehensive banking system for the Forge client. It includes features for managing player finances, transfers, and timesheet functionality, with a modern web-based interface for seamless user experience.
## Dependencies
- forge_client_main
## Authors
- J. Schmidt
- Creedcoder
- IDSolutions
## Features
### Banking System
1. **Bank Initialization** (`fnc_initBank.sqf`)
- Initializes the banking system
- Sets up necessary configurations and account structures
- Configures player account data and balances
- Handles server-side synchronization
2. **Bank Interface** (`fnc_openBank.sqf`)
- Opens the banking user interface
- Provides access to all banking functions
- Modern web-based UI with real-time updates
- Responsive design for optimal user experience
3. **Transaction Management**
- **Deposit** (`fnc_deposit.sqf`)
- Handles money deposits into bank accounts
- Validates transaction amounts
- Updates account balances in real-time
- **Withdraw** (`fnc_withdraw.sqf`)
- Manages money withdrawals from bank accounts
- Ensures sufficient funds
- Updates wallet balance immediately
- **Transfer** (`fnc_transfer.sqf`)
- Handles money transfers between players
- Validates recipient and amount
- Supports both account-to-account and wallet transfers
- **Submit** (`fnc_submit.sqf`)
- Processes transaction submissions
- Handles timesheet submissions
- Manages pending payments
- **Refresh** (`fnc_refresh.sqf`)
- Updates account information and balances
- Synchronizes with server data
- Updates UI elements
### User Interface
The module includes a modern web-based interface with:
1. **Account Overview**
- Current wallet balance
- Bank account balance
- Pending payments
- Transaction history
2. **Transaction Features**
- Transfer between wallet and account
- Player-to-player transfers
- Timesheet submission
- Transaction history view
3. **UI Components**
- Real-time balance updates
- Transaction notifications
- Input validation
- Error handling
- Responsive design
### Timesheet System
1. **Rating Integration**
- Tracks player rating
- Calculates pending payments
- Automatic payment processing
- Rating reset after submission
2. **Payment Processing**
- Automatic calculation based on rating
- Configurable payment multiplier
- Pending payment tracking
- Instant payment processing
## 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
- `XEH_postInit_client.sqf`: Client-specific post-initialization
- `XEH_preInit_server.sqf`: Server-specific pre-initialization
## Usage
To use the bank module:
1. Ensure the module is properly loaded in your mission
2. Access the bank through the provided UI
3. Perform transactions using the appropriate functions:
- Transfer money between wallet and account
- Send money to other players
- Submit timesheets for payment
- View transaction history
4. Monitor account status and transactions in real-time
## 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
- Web-based interface using HTML5, CSS3, and JavaScript
- Real-time data synchronization with server
- Secure transaction processing
- Client-server event system
- Persistent data storage
- Rating-based payment system
- Transaction history tracking
- Input validation and error handling
- Responsive UI design
- Cross-browser compatibility