Server Exports

Here you will find the list of usable exports for Banking, you can use them if you have basic or advanced programming knowledge, we do not recommend using these if you do not have such knowledge.


Generate Unique IBAN

Use following export to generate unique IBAN number

local newIBAN = exports['p_banking']:generateUniqueIBAN()
print(newIBAN)
  • Return:

    • newIBAN: string


Generate Unique Card Number

Use following export to generate unique Card Number

local cardNumber = exports['p_banking']:generateUniqueCardNumber()
print(cardNumber)
  • Return:

    • cardNumber: string


Update Credit Score

Use following export to update credit score for player

  • identifier: string

    • Existing player identifier

  • score: number

    • Score to add or remove


Create History

Use following export to create transaction history for account

  • iban: string

    • Iban account to add transaction

  • type: string

    • Type of transaction, can be income / outcome

  • amount: number

    • Amount to display in history

  • title: string

    • Title of transaction

  • from: string

    • Name of transaction sender

  • to: string

    • Name of transaction receiver

Return:

  • transactions: table

    • All account transactions


Get Player Accounts

Use following export to get player accounts

Return:

  • accounts: table

    • id: number

    • name: string

    • owner: string

    • iban: string

    • balance: number

    • role: owner / user

    • type: personal / society / shared

    • credit_score: number

    • logs: table

    • transactions: table

    • invoices: table

    • users: table

    • cards: table


addAccountMoney

Use following export to add money to account

  • identifier: string

    • IBAN of existing account / Job Name / Player Identifier

  • amount: number

    • Amount to add into account balance

Return:

  • result: boolean

    • return true or false if action finished succesfully or not


removeAccountMoney

Use following export to remove money from account

  • identifier: string

    • IBAN of existing account / Job Name / Player Identifier

  • amount: number

    • Amount to remove from account balance

Return:

  • result: boolean

    • return true or false if action finished succesfully or not


getAccountMoney

Use following export to get account money

  • identifier: string

    • IBAN of existing account / Job Name / Player Identifier

Return:

  • money: number

    • Account Balance


createInvoice

Use following export to create invoice

  • toIban: string

    • IBAN which will receive invoice

  • fromIban: string

    • IBAN which will receive money from invoice

  • fromName: string

    • Displayed name in invoices section

  • amount: number

    • Invoice amount

  • title: string

    • Title of invoice

Return:

  • result: boolean

Last updated