Server
π How to use Exports
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 bonus
local success = 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).
Parameter
Type
Description
symbol
string
The stock ticker (e.g., "LSC", "MAZE").
eventType
string
"crash" or "boom"
Returns: boolean, string
Last updated