All functions are server-side and can be accessed using the standard FiveM export syntax:
exports['ak47_banking']:FunctionName(parameters)
👤 Player Banking & Transactions
These functions allow you to safely manipulate a player's personal bank account without creating "silent transactions." Using these exports ensures the transaction appears in the player's UI.
AddPlayerBankMoney
Adds money to a player's personal bank account and logs the transaction.
Parameter
Type
Description
source
integer
The server ID of the player.
amount
number
The amount to deposit.
reason
string
The description shown in the UI.
Returns: boolean (true if successful)
-- Example: Paying a player a specific bonuslocalsuccess=exports['ak47_banking']:AddPlayerBankMoney(source, 5000, "Lottery Winnings")
RemovePlayerBankMoney
Removes money from a player's personal bank account (fails if they have insufficient funds).
Parameter
Type
Description
source
integer
The server ID of the player.
amount
number
The amount to withdraw.
reason
string
The description shown in the UI.
Returns: boolean, string (success status, and an error message if failed)
LogCustomTransaction
Manually push a transaction log to a player's UI with a custom icon and color. Useful if you handle the money logic elsewhere but want it on their bank statement.
Parameter
Type
Description
citizenid
string
The Citizen ID of the player.
title
string
Transaction description.
amount
number
Positive for income, negative for expense.
type
string
"deposit", "withdrawal", or "transfer"
icon
string
Lucide Icon name (e.g., "Car", "Home")
color
string
Tailwind color class (e.g., "bg-red-500")
🏢 Business & Shared Accounts
Interact with Job, Gang, or custom Shared player accounts.
GetAccountBalance
Returns the current balance of any business or shared account.
Parameter
Type
Description
accountName
string
The name of the account (e.g., "police", "mechanic").
Returns: number
AddMoney / RemoveMoney
Adds or removes money from a business/shared account.
Parameter
Type
Description
accountName
string
The name of the account.
amount
number
The amount to transact.
reason
string
Reason for the transaction.
Returns: boolean
HasSharedAccountAccess
Checks if a specific player has permission to use a shared account.
Parameter
Type
Description
citizenid
string
The Citizen ID of the player.
accountName
string
The name of the shared account.
Returns: boolean
💳 Credit & Debit Cards
GetPlayerCards
Fetches a list of all cards owned by a player.
Parameter
Type
Description
citizenid
string
The Citizen ID of the player.
Returns: table (List of card objects)
ChargeCard
Directly charges a specific card. Automatically handles whether the card is prepaid or linked directly to the main bank balance. Excellent for toll booths or vending machines.
Parameter
Type
Description
cardId
string
The unique ID of the card.
amount
number
The amount to charge.
reason
string
Transaction description.
Returns: boolean, string
📈 Credit Score & Loans
GetCreditScore
Retrieves a player's current credit score.
Parameter
Type
Description
citizenid
string
The Citizen ID of the player.
Returns: number
UpdateCreditScore
Modifies a player's credit score (can be positive or negative).
Parameter
Type
Description
citizenid
string
The Citizen ID of the player.
amount
number
Amount to add/subtract.
Returns: boolean
GetActiveLoans
Checks a player's debt status. Useful for preventing players from taking out car loans if they are already in massive debt.
Returns: table{ count, totalDebt, loans }
⚖️ Law Enforcement & Taxes
GetBankFlags / AddBankFlag / RemoveBankFlag
Integrate with an external MDT to place freezes, warrants, or flags on a bank account.
GetUnpaidTaxes
Check if a player is evading taxes.
Returns: table{ hasUnpaid, totalOwed, overdueCount, records }
🏛️ City Treasury (Mayor/Gov)
Interact with the central government account.
Functions
GetCityTreasuryBalance()
AddCityTreasuryFunds(amount, reason)
RemoveCityTreasuryFunds(amount, reason)
📊 Stock Market Manipulation
ForceStockMarketEvent
Force a specific stock to "crash" or "boom". Perfect for Heist scripts (e.g., robbing a specific company crashes their stock, or stealing data boosts a rival's stock).
-- Example: Charging a player for a vehicle purchase
local success, msg = exports['ak47_banking']:RemovePlayerBankMoney(source, 25000, "Vehicle Purchase: Panto")
if not success then
print("Failed: " .. msg) -- "Insufficient funds"
end
-- Example: Logging a house purchase with a custom house icon
exports['ak47_banking']:LogCustomTransaction("CID12345", "Purchased Property", -150000, "withdrawal", "Home", "bg-purple-500")
local mechFunds = exports['ak47_banking']:GetAccountBalance("mechanic")
print("The mechanic shop has $" .. mechFunds)
-- Example: Charging a business for importing supplies
local success = exports['ak47_banking']:RemoveMoney("burgershot", 500, "Ingredient Restock")
-- Example: Paying a business from a state grant
local success = exports['ak47_banking']:AddMoney("police", 50000, "State Funding Grant")
local hasAccess = exports['ak47_banking']:HasSharedAccountAccess(cid, "SmithFamilyFund")
local cards = exports['ak47_banking']:GetPlayerCards(cid)
for _, card in ipairs(cards) do
print("Card ID: " .. card.id .. " | Balance: $" .. card.balance)
end
local score = exports['ak47_banking']:GetCreditScore(cid)
if score >= 700 then
print("Approved for premium financing!")
end
-- Reward player for paying a custom dealership invoice on time
exports['ak47_banking']:UpdateCreditScore(cid, 5)
local debtInfo = exports['ak47_banking']:GetActiveLoans(cid)
print("Player has " .. debtInfo.count .. " loans totaling $" .. debtInfo.totalDebt)
-- Add a flag to an account
exports['ak47_banking']:AddBankFlag(cid, "Suspected Fraud", "Officer Smith")
-- Read flags (Returns a table of flags)
local flags = exports['ak47_banking']:GetBankFlags(cid)
-- Remove a flag
exports['ak47_banking']:RemoveBankFlag(cid, "Suspected Fraud")
local taxData = exports['ak47_banking']:GetUnpaidTaxes(cid)
if taxData.hasUnpaid then
print("Cannot sell property to tax evaders!")
end
-- Example: Paying for a city-wide event from the treasury
local success, msg = exports['ak47_banking']:RemoveCityTreasuryFunds(50000, "City Event Funding")
-- Example: Player successfully robbed Fleeca Bank
exports['ak47_banking']:ForceStockMarketEvent("FLE", "crash")