πŸ’ΆBanking

A core script for managing personal and business bank accounts. These are all server-side exports to manage accounts.

Bank Account Model

-- Output:
--{
--    number = "BNK123456789", -- The unique bank account number
--    type = "", -- The type of account. personal or business
--    name = "", -- The name of the account, user defined
--    owner = "", -- The CSN of the account owner
--    is_primary = false, -- If the account is a primary account for a person
--    balance = 0, -- The balance of the account
--    access = {}, -- A list of additional users CSN's and the access types they have
--    max_overdraft = 0, -- The maximum amount of overdraft available for an account
--    is_frozen = false, -- If the account is frozen or not
--}

AccountExists

This can be used to check if the an account exists.

-- number: The account number to check

-- Returns true or false

exports.banking:AccountExists(number)

GetAccount

Returns the full bank account model of the number.

CreateAccount

Used to forcibly create a bank account.

BankDeposit

Deposit money into a bank account and generate a transaction for it.

BankWithdraw

Withdraw money from a bank account and generate a transaction for it.

BankSet

Set's the balance for an account and generates a transaction for it.

DeleteAccount

Deletes a bank account. By default it doesn't allow deleting an account with a negative balance however this can be disabled.

Last updated