mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-16 21:46:03 +01:00
29 lines
670 B
Markdown
29 lines
670 B
Markdown
|
|
### societybank.lua
|
|||
|
|
|
|||
|
|
This module handles financial operations for society accounts, typically used for jobs or organizations.
|
|||
|
|
|
|||
|
|
- **getSocietyAccount(society)**
|
|||
|
|
|
|||
|
|
- Retrieves the current balance for the specified society.
|
|||
|
|
- **Example:**
|
|||
|
|
```lua
|
|||
|
|
local balance = getSocietyAccount("police")
|
|||
|
|
print("Police account balance: $"..balance)
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
- **chargeSociety(society, amount)**
|
|||
|
|
|
|||
|
|
- Deducts a specified amount from the society's account.
|
|||
|
|
- **Example:**
|
|||
|
|
```lua
|
|||
|
|
chargeSociety("police", 500)
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
- **fundSociety(society, amount)**
|
|||
|
|
|
|||
|
|
- Adds funds to a society’s account.
|
|||
|
|
- **Example:**
|
|||
|
|
```lua
|
|||
|
|
fundSociety("ambulance", 1200)
|
|||
|
|
```
|