Logo

DIVERSITY

Documentation

Modules

Banking

The Banking module provides functions for banking resources.

Server Functions


GetResourceName

Returns the name of the underlying banking resource being used.

server.lua
local resourceName = dBridge.Banking.GetResourceName()
Returned DataTypeDescription
resourceName
string
The name of the banking resource (e.g., "qb-banking").

GetPlayerAccountBalance

Returns the player account balance for a given account name.

server.lua
local balance = dBridge.Banking.GetPlayerAccountBalance('account123')
ArgumentTypeDescription
accountId
string
Account name/identifier
Returned DataTypeDescription
balance
number
Returns the total account's balance.

AddPlayerAccountBalance

Adds money to a specific player's account.

server.lua
local result = dBridge.Banking.AddPlayerAccountBalance('account123', 100)
ArgumentTypeDescription
accountId
string
Account name/identifier
amount
number
Amount to add.
reason?
string
Reason for the transaction (optional).
Returned DataTypeDescription
result
boolean
Returns true if the transaction was successful, false otherwise.

RemovePlayerAccountBalance

Removes money from a specific player's account.

server.lua
local result = dBridge.Banking.RemovePlayerAccountBalance('account123', 100)
ArgumentTypeDescription
accountId
string
Account name/identifier
amount
number
Amount to remove.
reason?
string
Reason for the transaction (optional).
Returned DataTypeDescription
result
boolean
Returns true if the transaction was successful, false otherwise.

GetJobAccountBalance

Returns the job account balance for a given account name.

server.lua
local balance = dBridge.Banking.GetJobAccountBalance('police')
ArgumentTypeDescription
accountId
string
Account identifier / job name
Returned DataTypeDescription
balance
number
Returns the total account's balance.

AddJobAccountBalance

Adds money to a specific job's account.

server.lua
local result = dBridge.Banking.AddJobAccountBalance('police', 100)
ArgumentTypeDescription
accountId
string
Account identifier / job name
amount
number
Amount to add.
reason?
string
Reason for the transaction (optional).
Returned DataTypeDescription
result
boolean
Returns true if the transaction was successful, false otherwise.

RemoveJobAccountBalance

Removes money from a specific job's account.

server.lua
local result = dBridge.Banking.RemoveJobAccountBalance('police', 100)
ArgumentTypeDescription
accountId
string
Account identifier / job name
amount
number
Amount to remove.
reason?
string
Reason for the transaction (optional).
Returned DataTypeDescription
result
boolean
Returns true if the transaction was successful, false otherwise.

Was this page helpful?