Callbacks
In this section, you'll find easy-to-use callbacks for managing player transactions, which can be integrated into your other scripts for enhanced functionality.
GetTransactions
GetTransactionsDescription: Retrieve a list of all transactions associated with a player.
Usage:
local transactions = lib.callback.await("cloud-banking:server:GetTransactions", false)Returns:
Array of Transactions: Each transaction includes:
id- Unique Transaction IDtype- Type of Transaction (e.g., "deposit", "withdraw")date- Date of Transactiontime- Time of Transactionamount- Amount Transferredsender- Name of the Senderreceiver- Name of the Receiver
StoreTransaction
StoreTransactionDescription: Stores a new transaction record in the database.
Usage:
lib.callback.await("cloud-banking:server:StoreTransaction", false, transactionAmount, transactionType, receiverId)Parameters:
transactionAmount- The amount of the transaction.transactionType- The type of transaction (e.g., "Deposit", "Withdrawal").receiverId?- The ID of the transaction receiver (leave empty if not applicable).
Last updated