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:
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