wasvendel_bank
Bank system: personal / shared accounts, loan, storage, transfers between banks.
Requirements
- VORP (or compatible RedM core)
oxmysql
Installation
- Unzip
wasvendel_bank. - Put the
wasvendel_bankfolder into your serverresourcesdirectory. - Add the resource to
server.cfgafter your framework core.
ensure oxmysql
ensure your_core
ensure wasvendel_bankDatabase
There is no wasvendel_bank.sql in the resource. The tables (wasvendel_bank, shared, loans) are created automatically on startup (CREATE TABLE IF NOT EXISTS).
Configuration
Edit:
config.luasv_config.lua
Commands
| Command | Source | Usage | Description |
|---|---|---|---|
/setbankmoney |
Config.AdminCommand.setbankmoney (if enablecommand) |
/setbankmoney [targetId] [bank] [amount] |
Set a player's bank balance |
The charid is resolved from the target player by the code — you do not need a separate charid argument.
Exports
Server
| Export | Signature | Description |
|---|---|---|
SetBankMoney |
(source, bank, amount) |
Set balance |
GetBankMoney |
(source, bank) -> number |
Get balance |
IsBankMoneyEnough |
(source, bank, amount) -> boolean |
Whether there is enough money |
RemoveMoneyInBank |
(source, bank, amount) |
Remove |
AddMoneyInBank |
(source, bank, amount) |
Add |
local balance = exports['wasvendel_bank']:GetBankMoney(src, 'valentine')
exports['wasvendel_bank']:AddMoneyInBank(src, 'valentine', 100)