Server
Server-side exports for banking and fraud system integration.
Overview
All server exports can be invoked using standard FiveM export syntax:
exports['ak47_banking']:FunctionName(...)Player Banking
AddPlayerBankMoney
Adds money to a player's personal bank account and logs the transaction.
local success = exports['ak47_banking']:AddPlayerBankMoney(source, amount, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
source |
integer | Yes | Server ID of the player |
amount |
number | Yes | Monetary amount to deposit |
reason |
string | Yes | Description displayed in transaction history |
- Returns:
boolean-trueif successful,falseotherwise.
RemovePlayerBankMoney
Removes money from a player's personal bank account.
local success, msg = exports['ak47_banking']:RemovePlayerBankMoney(source, amount, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
source |
integer | Yes | Server ID of the player |
amount |
number | Yes | Monetary amount to withdraw |
reason |
string | Yes | Description displayed in transaction history |
- Returns:
boolean,string- Success status and error message on failure.
LogCustomTransaction
Pushes a custom transaction entry directly to a player's transaction history.
exports['ak47_banking']:LogCustomTransaction(citizenid, title, amount, type, icon, color)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
title |
string | Yes | Transaction title description |
amount |
number | Yes | Positive for income, negative for expense |
type |
string | Yes | Transaction type: deposit, withdrawal, or transfer |
icon |
string | Yes | Lucide icon name |
color |
string | Yes | Tailwind CSS color class |
- Returns:
void
Business and Shared Accounts
GetAccountBalance
Retrieves the current balance of a business or shared account.
local balance = exports['ak47_banking']:GetAccountBalance(accountName)| Parameter | Type | Required | Description |
|---|---|---|---|
accountName |
string | Yes | Name of the account |
- Returns:
number- Current account balance.
AddMoney
Adds funds to a business or shared account.
local success = exports['ak47_banking']:AddMoney(accountName, amount, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
accountName |
string | Yes | Name of the account |
amount |
number | Yes | Monetary amount to deposit |
reason |
string | Yes | Reason for the deposit |
- Returns:
boolean-trueif successful,falseotherwise.
RemoveMoney
Removes funds from a business or shared account.
local success = exports['ak47_banking']:RemoveMoney(accountName, amount, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
accountName |
string | Yes | Name of the account |
amount |
number | Yes | Monetary amount to withdraw |
reason |
string | Yes | Reason for the withdrawal |
- Returns:
boolean-trueif successful,falseotherwise.
HasSharedAccountAccess
Checks if a player has permission to use a shared account.
local hasAccess = exports['ak47_banking']:HasSharedAccountAccess(citizenid, accountName)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
accountName |
string | Yes | Name of the shared account |
- Returns:
boolean-trueif player has access,falseotherwise.
Card Management
GetPlayerCards
Retrieves all ATM and debit cards owned by a player.
local cards = exports['ak47_banking']:GetPlayerCards(citizenid)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
- Returns:
table- Array of card data tables.
ChargeCard
Directly charges a specified card identifier.
local success, msg = exports['ak47_banking']:ChargeCard(cardId, amount, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
cardId |
string | Yes | Unique card identifier |
amount |
number | Yes | Monetary amount to charge |
reason |
string | Yes | Transaction description |
- Returns:
boolean,string- Success status and response message.
Credit Score and Loans
GetCreditScore
Retrieves the current credit score of a player.
local score = exports['ak47_banking']:GetCreditScore(citizenid)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
- Returns:
number- Current credit score.
UpdateCreditScore
Adjusts a player's credit score positively or negatively.
local success = exports['ak47_banking']:UpdateCreditScore(citizenid, amount)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
amount |
number | Yes | Score adjustment amount |
- Returns:
boolean-trueif updated successfully,falseotherwise.
GetActiveLoans
Retrieves active loan records and outstanding debt for a player.
local debtInfo = exports['ak47_banking']:GetActiveLoans(citizenid)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
- Returns:
table- Table containingcount,totalDebt, andloans.
Law Enforcement and Taxes
GetBankFlags
Retrieves all active flags placed on a bank account.
local flags = exports['ak47_banking']:GetBankFlags(citizenid)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
- Returns:
table- Array of active flag strings.
AddBankFlag
Adds a law enforcement or administrative flag to a bank account.
exports['ak47_banking']:AddBankFlag(citizenid, reason, author)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
reason |
string | Yes | Reason for the flag |
author |
string | Yes | Identifier of the author |
- Returns:
void
RemoveBankFlag
Removes a specific flag from a bank account.
exports['ak47_banking']:RemoveBankFlag(citizenid, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
reason |
string | Yes | Flag reason string to remove |
- Returns:
void
GetUnpaidTaxes
Retrieves outstanding tax debt and overdue records for a player.
local taxData = exports['ak47_banking']:GetUnpaidTaxes(citizenid)| Parameter | Type | Required | Description |
|---|---|---|---|
citizenid |
string | Yes | Citizen ID of the player |
- Returns:
table- Table containinghasUnpaid,totalOwed,overdueCount, andrecords.
City Treasury
GetCityTreasuryBalance
Retrieves the current balance of the city treasury.
local balance = exports['ak47_banking']:GetCityTreasuryBalance()| Parameter | Type | Required | Description |
|---|---|---|---|
| None | N/A | No | Takes no parameters |
- Returns:
number- Current treasury balance.
AddCityTreasuryFunds
Deposits funds into the central city treasury account.
local success, msg = exports['ak47_banking']:AddCityTreasuryFunds(amount, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
amount |
number | Yes | Monetary amount to deposit |
reason |
string | Yes | Description for the deposit |
- Returns:
boolean,string- Success status and response message.
RemoveCityTreasuryFunds
Withdraws funds from the central city treasury account.
local success, msg = exports['ak47_banking']:RemoveCityTreasuryFunds(amount, reason)| Parameter | Type | Required | Description |
|---|---|---|---|
amount |
number | Yes | Monetary amount to withdraw |
reason |
string | Yes | Description for the withdrawal |
- Returns:
boolean,string- Success status and response message.
Stock Market Manipulation
ForceStockMarketEvent
Forces an immediate market crash or boom event for a specific stock ticker.
local success, msg = exports['ak47_banking']:ForceStockMarketEvent(symbol, eventType)| Parameter | Type | Required | Description |
|---|---|---|---|
symbol |
string | Yes | Stock ticker symbol |
eventType |
string | Yes | Event type: crash or boom |
- Returns:
boolean,string- Success status and result message.