Server

Exports - Serverside

addTransaction

Parameters receiver_iban - string - IBAN of the Player receiver_name - string - Name of the Player sender_iban - string - IBAN of the Sender sender_name - string - Name of the Sender amount - number - Amount reason - string - Reason action - string - Can be 'deposit', 'withdraw', 'transfer' or others account - string - Can be 'main', '1' or 'society'

Set account to 'main' for main account, '1' for second account or 'society' for society account

exports.msk_banking:addTransaction(receiver_iban, receiver_name, sender_iban, sender_name, amount, reason, action, account)

-- Example
local iban = exports.msk_banking:getIBANFromIdentifier(xPlayer.identifier)
exports.msk_banking:addTransaction(iban, xPlayer.name, 'paycheck', xPlayer.job.label, 1523, 'Paycheck', 'paycheck', 'main')

getIBANFromIdentifier

Parameters identifier - string - The players identifier account - string - 'main' for main account, '1' for second account or 'society' for society account

Retuns iban - string - The IBAN of the given Player

local iban = exports.msk_banking:getIBANFromIdentifier(identifier, account)

-- Example
local iban = exports.msk_banking:getIBANFromIdentifier(xPlayer.identifier, 'main')
local iban = exports.msk_banking:getIBANFromIdentifier(xPlayer.identifier, '1')

getAccount

Parameters iban - string - The IBAN of the Player

Retuns data - table <money, iban, account, identifier> - The data of the main account

  • data.account can be 'main' for main account, '1' for second account or 'society' for society account

  • If data.account is '1' then data.identifier is the jobname

local data = exports.msk_banking:getAccount('SA123456')
print(data.money, data.iban, data.account, data.identifier)

getAccountFromJob

Parameters iban - string - The IBAN of the Player

Retuns data - table <money, iban, account, identifier> - The data of the main account

  • data.account is always 'society'

  • data.identifier is always the jobname

local data = exports.msk_banking:getAccountFromJob(iban)
print(data.money, data.iban, data.account, data.identifier)

getSocietyLabel

Parameters jobName - string - The Jobname

Retuns jobLabel - string - The Label of the given name from config.lua

local jobLabel = exports.msk_banking:getSocietyLabel('police')
print(jobLabel)

getInvestment

Parameters playerData - table - Player Data

Retuns invest - number - The current Invesment Amount as a number

local invest = exports.msk_banking:getInvestment({source = playerId})
local invest = exports.msk_banking:getInvestment({identifier = xPlayer.identifier})
local invest = exports.msk_banking:getInvestment({player = xPlayer})

getCartridgeBursted

Parameters playerId - string|number - The ServerId of the player

Retuns bursted - boolean - whether a Cartridge is Bursted or not while an ATM Robbery

local bursted = getCartridgeBursted(playerId)

Last updated