MSK Scripts
TebexGithubDiscordMusiker15
  • MSK Scripts
    • Welcome
  • Common Issues
    • Keymaster
  • Miscellaneous
    • Change Notifications
  • Scripts
    • MSK Core
      • Installation
      • Functions
        • Client
          • Ace Permission
          • Commands
          • Coords
          • Player
          • Points
          • Request
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
          • Vehicle
        • Shared
          • String
          • Math
          • Table
          • Timeout
          • Vector
        • Server
          • Ace Permission
          • Ban System
          • Commands
          • Player
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
    • MSK Banking
      • Installation
        • Paycheck Transaction
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Server Callbacks
    • MSK EngineToggle
      • Guides
      • Exports
        • Client
      • Event Handler
        • Client
        • Server
    • MSK Fuel
      • Config
      • Exports
        • Client
    • MSK Garage
      • Config
      • Exports
        • Client
    • MSK Handcuffs
      • Guides
        • General Edits for Jobs
        • Jaksam Job Creator
        • Multichar
        • ox_inventory
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Event Handlers
    • MSK Radio
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Server
    • MSK Simcard
      • Installation
        • Config.Database
      • Config
    • MSK VehicleKeys
      • Guides
        • Installation
        • Integrations
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
    • MSK Whitelist
      • Config
      • Exports
        • Client
        • Server
    • MSK Weaponammo
Powered by GitBook
On this page
  • getPlayerPin
  • addTransaction
  • getIBANFromIdentifier
  • getAccount
  • getAccountFromJob
  • getSocietyLabel
  • getInvestment
  • getCartridgeBursted
  1. Scripts
  2. MSK Banking
  3. Exports

Server

Exports - Serverside

getPlayerPin

Parameters identifier - string - Player Identifier

Returns pin - number - The PIN of the given Player

local pin = exports.msk_banking:getPlayerPin(identifier)

-- Example
exports.msk_banking:getPlayerPin(xPlayer.identifier)

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

Returns 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

Returns 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

Returns 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

Returns 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

Returns 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

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

local bursted = getCartridgeBursted(playerId)

Last updated 7 months ago