JustScripts
  • Welcome to JustScripts Documentation
  • JustCarWash
    • Installation
    • Config Setup
  • JustHud
    • Configuration
    • Features
    • Chat
    • Placeholders
    • Elements
    • Custom Elements
    • Exports
  • JustHud(Old)
    • Installation
    • Config Setup
    • Events
  • JustTrucker
    • Installation
    • Config Setup
  • JustSecurity
    • Installation
  • JustDrugs
    • Installation
  • JustFarmer
    • Installation
  • JustCases
    • Configuration
    • Exports
    • Tebex integration
  • JustBank
    • Configuration
    • Exports
    • Society Accounts
  • JustDataSync
  • JustFishing
  • JustNotify
    • Exports
Powered by GitBook
On this page
  • Server Exports
  • GetUserCards
  • GetCardId
  • GetCard
  • AddMoney
  • RemoveMoney
  • SetMoney
  • AddInvoice
  • PayInvoice
  • GetInvoices
  • GetUnpaidInvoices
  • IsSocietyExist
  • CreateSocietyAccount
  • GetSocietyMoney
  • AddSocietyMoney
  • RemoveSocietyMoney
  • RemoveSocietyMoney
  1. JustBank

Exports

Server Exports

GetUserCards

Get user cards ids

-- player: number - player source
-- return: table - a table containing user cards ids
exports.JustBanks:GetUserCards(player)

GetCardId

Get card id by card_number

-- player: string - card_number
-- return: number - card id
exports.JustBanks:GetCardId(card_number)

GetCard

Get card info by id

-- card: number - card id
-- return: table - card info
exports.JustBanks:GetCard(card)

-- Example return 
local response = {
    id = 1,
    holder = 1, -- holder id
    type = "basic", -- card type (basic, pro, ultimate)
    card_number = "5530359442202495",
    pin = "1111",
    balance = 1000,
    is_main = true, -- is this main card ?
    is_suspended = false,
    is_locked = false
}

AddMoney

Add balance to card

-- card: number - card id
-- amount: number - amount
exports.JustBanks:AddMoney(card, amount)

RemoveMoney

Remove balance from card

-- card: number - card id
-- amount: number - amount
exports.JustBanks:RemoveMoney(card, amount)

SetMoney

Set card balance

-- card: number - card id
-- balance: number - amount
exports.JustBanks:SetMoney(card, amount)

AddInvoice

Adds a new invoice for online player

-- player: number - player source
-- title: string
-- description: string
-- due: number - Invoice due date, in hours
-- amount: number
-- return: table - Invoice object
exports.JustBanks:AddInvoice(player, title, description, due, amount)

local object = {
    id = 1,
    user = 1, -- user bank id
    sender = 1, -- sender bank id
    user_name = "Name", -- user name
    sender_name = "System", -- sender name
    title = "",
    description = "",
    time = 1744139335, -- Issued time (unixtime)
    due_time = 1744139335, -- Due time (unixtime)
    amount = 1000,
    status = false -- whether is invoice paid or not
}

PayInvoice

Set an invoice in paid status

-- invoice: number - invoice id
exports.JustBanks:PayInvoice(invoice)

GetInvoices

Get all invoices of user

-- player: number - player source
-- return: table - table of invoice objects
exports.JustBanks:GetInvoices(player)

GetUnpaidInvoices

Get unpaid invoices of user

-- player: number - player source
-- return: table - table of invoice objects
exports.JustBanks:GetInvoices(player)

IsSocietyExist

Whether society account exists on bank

-- accountName: string - Society unique name
-- return: bool 
exports.JustBanks:IsSocietyExist(player)

CreateSocietyAccount

Manually creating society account

-- accountName: string - Society unique name
-- return: number - account id
exports.JustBanks:CreateSocietyAccount(accountName)

GetSocietyMoney

Get current balance of society account

-- accountName: string - Society unique name
-- return: number - balance
exports.JustBanks:GetSocietyMoney(accountName)

AddSocietyMoney

Add balance to society account

-- accountName: string - Society unique name
-- amount: number
exports.JustBanks:AddSocietyMoney(accountName, amount)

RemoveSocietyMoney

Remove balance from society account

-- accountName: string - Society unique name
-- amount: number
exports.JustBanks:RemoveSocietyMoney(accountName, amount)

RemoveSocietyMoney

Set balance of society account

-- accountName: string - Society unique name
-- amount: number
exports.JustBanks:SetSocietyMoney(accountName, amount)
PreviousConfigurationNextSociety Accounts

Last updated 2 months ago