Money

Functions for reading and modifying a player's money on the server.

getMoney

Get the amount of money a player has of a given type.

local amount = KOJA.Server.getMoney(source, mtype)
Parameter
Type
Description

source

number

Player server ID

mtype

string

Money type — "cash", "bank", "black"

Returns number

addMoney

Add money to a player's account.

local ok = KOJA.Server.addMoney(source, amount, mtype, reason)
Parameter
Type
Description

source

number

Player server ID

amount

number

Amount to add

mtype

string

Money type — "cash", "bank", "black"

reason

string?

Reason (logged by some frameworks)

Returns boolean

removeMoney

Remove money from a player's account.

Same parameters as addMoney.

Returns boolean

Money Types

Value
ESX
QBCore

"cash"

money account

cash money type

"bank"

bank account

bank money type

"black"

black_money account

crypto money type

Examples

Last updated