Modules
Banking
The Banking module provides functions for banking resources.
Server Functions
GetResourceName
Returns the name of the underlying banking resource being used.
local resourceName = dBridge.Banking.GetResourceName()| Returned Data | Type | Description |
|---|---|---|
resourceName | string | The name of the banking resource (e.g., "qb-banking"). |
GetPlayerAccountBalance
Returns the player account balance for a given account name.
local balance = dBridge.Banking.GetPlayerAccountBalance('account123')| Argument | Type | Description |
|---|---|---|
accountId | string | Account name/identifier |
| Returned Data | Type | Description |
|---|---|---|
balance | number | Returns the total account's balance. |
AddPlayerAccountBalance
Adds money to a specific player's account.
local result = dBridge.Banking.AddPlayerAccountBalance('account123', 100)| Argument | Type | Description |
|---|---|---|
accountId | string | Account name/identifier |
amount | number | Amount to add. |
reason? | string | Reason for the transaction (optional). |
| Returned Data | Type | Description |
|---|---|---|
result | boolean | Returns true if the transaction was successful, false otherwise. |
RemovePlayerAccountBalance
Removes money from a specific player's account.
local result = dBridge.Banking.RemovePlayerAccountBalance('account123', 100)| Argument | Type | Description |
|---|---|---|
accountId | string | Account name/identifier |
amount | number | Amount to remove. |
reason? | string | Reason for the transaction (optional). |
| Returned Data | Type | Description |
|---|---|---|
result | boolean | Returns true if the transaction was successful, false otherwise. |
GetJobAccountBalance
Returns the job account balance for a given account name.
local balance = dBridge.Banking.GetJobAccountBalance('police')| Argument | Type | Description |
|---|---|---|
accountId | string | Account identifier / job name |
| Returned Data | Type | Description |
|---|---|---|
balance | number | Returns the total account's balance. |
AddJobAccountBalance
Adds money to a specific job's account.
local result = dBridge.Banking.AddJobAccountBalance('police', 100)| Argument | Type | Description |
|---|---|---|
accountId | string | Account identifier / job name |
amount | number | Amount to add. |
reason? | string | Reason for the transaction (optional). |
| Returned Data | Type | Description |
|---|---|---|
result | boolean | Returns true if the transaction was successful, false otherwise. |
RemoveJobAccountBalance
Removes money from a specific job's account.
local result = dBridge.Banking.RemoveJobAccountBalance('police', 100)| Argument | Type | Description |
|---|---|---|
accountId | string | Account identifier / job name |
amount | number | Amount to remove. |
reason? | string | Reason for the transaction (optional). |
| Returned Data | Type | Description |
|---|---|---|
result | boolean | Returns true if the transaction was successful, false otherwise. |