GetAccountDataBySource
exports['kartik-banking']:GetAccountDataBySource(source, bankType)
🔹 Description
Returns the personal bank account data for a player identified by their source
, filtered by a specific bankType
(e.g., "fleeca"
or "swiss"
).
Useful when retrieving account data from players currently online.
🔧 Parameters
Name
Type
Required
Description
source
number
✅
The player's server ID (source) from FiveM.
bankType
string
✅
The type of bank to filter for (e.g., "fleeca"
, "swiss"
).
📤 Returns
Returns the first matching personal account row from the kartik_banking_accounts
table as a raw database result, or false
if no account is found.
Example Return Structure:
{
id = 1,
owner = "CITIZEN1234",
accountNumber = "FLEECA123",
accountType = "personal",
bankType = "fleeca",
accountName = "Kartik's Account",
status = "active",
income = 5000,
expenses = 2000,
transfer = 1000,
members = "[]"
}
🧠 Example Usage
local account = exports['kartik-banking']:GetAccountDataBySource(source, "fleeca")
if account then
print("Account Number:", account.accountNumber)
else
print("Player has no Fleeca personal account.")
end
❌ Returns false
If:
false
If:No account is found for the specified
source
andbankType
.
Last updated