UK Banking

LGMods_Banking is a professional banking system for FiveM servers. This documentation outlines all available server-side exports for integration with external resources.


Important

All exports must be used server-side only.

Using these exports client-side will not work.


AddMoney 💰

Adds funds to a personal or business account.

Export

exports["LGMods_Banking"]:AddMoney(playerId, amount, accountType, businessName)

Parameters

Parameter
Type
Required
Description

playerId

number

Yes

Player server ID

amount

number

Yes

Amount to add (must be greater than 0)

accountType

string

Yes

"personal" or "business"

businessName

string

Business only

Business/job name (e.g. "lscustoms")

Returns

boolean Returns true if accepted, otherwise false.

Example

Behaviour

• Sends an in-game notification • Inserts a transaction into lgmods_banking_transactions • Refreshes relevant UI data


RemoveMoney 💸

Removes funds from a personal or business account.

Export

Parameters

Parameter
Type
Required
Description

playerId

number

Yes

Player server ID

amount

number

Yes

Amount to remove (must be greater than 0)

accountType

string

Yes

"personal" or "business"

businessName

string

Business only

Business/job name

Returns

boolean Returns true on success, false on failure.

Business Withdrawal Permissions

When removing money from a business account:

• Player must have the matching job name • Player must meet Config.BusinessAccounts[businessName].minGrade

If either condition fails, the withdrawal is denied.

Example


AddTransaction 🧾

Manually inserts a transaction entry into the banking history.

Export

Parameters

Parameter
Type
Required
Description

playerId

number

Yes

Player server ID

transactionType

string

Yes

Example: "Purchase", "Payroll"

amount

number

Yes

Must be greater than 0

accountType

string

Yes

"personal" or "business"

note

string

Optional

Custom description

businessName

string

Business only

Business/job name

Returns

boolean

Example


GetAccountDetails 🏦

Retrieves account information for personal or business accounts.

This export is callback-based due to asynchronous database queries.

Export

Parameters

Parameter
Type
Required
Description

playerId

number

Yes

Player server ID

accountType

string

Yes

"personal" or "business"

businessName

string

Business only

Business/job name

callback

function

Yes

Receives result object

Callback Response

On success (Personal):

success = true account.identifier account.balance account.sortcode account.accountnumber

On success (Business):

success = true account = row from lgmods_business_accounts

On failure:

success = false error = reason string

Example


TransferMoney 🔁

Initiates a transfer from a personal or business account.

Export

Parameters

Parameter
Type
Required
Description

playerId

number

Yes

Player initiating transfer

amount

number

Yes

Must be greater than 0

fromType

string

Yes

"personal" or "business"

toSortcode

string

Yes

Destination sort code

toAccountnumber

string

Yes

Destination account number

businessName

string

Business only

Required if fromType is business

Returns

boolean

Example


Database Requirements 🗄

Required Tables

• lgmods_banking_transactions • lgmods_business_accounts

Framework Integration

ESX

• users.identifier • users.sortcode • users.accountnumber

QBCore

• players.citizenid • players.sortcode • players.accountnumber


Dependencies 🔧

• oxmysql • ESX or QBCore • Correct Config.Framework configuration

Last updated