RemoveAccountMoney

exports['kartik-banking']:RemoveAccountMoney(account, amount, reason)

🔹 Description

Withdraws money from a non-personal, non-shared bank account (e.g., business, gang, or government accounts). It uses the account's linked debit card and triggers the internal removeMoney function to process the deduction.


🔧 Parameters

Name
Type
Required
Description

account

string

usually company or society account ( e.g police, bcso, banker )

amount

number

The amount of money to withdraw.

reason

string

Optional. Describes why the funds are being withdrawn (e.g., "Rent").


📤 Returns

Type
Description

true

If the withdrawal was successful.

false

If the withdrawal failed (e.g., invalid account).


🧠 Example Usage

local success = exports['kartik-banking']:RemoveAccountMoney("gang_xyz", 5000, "Weapon Purchase")
if success then
    print("Withdrawal successful.")
else
    print("Withdrawal failed.")
end


❌ Will Return false If:

  • The account is not found.

  • The account type is "personal" or "shared".

  • There is no linked debit card.

  • The removeMoney operation fails.


Last updated