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

Description: 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 ID

    • type - Type of Transaction (e.g., "deposit", "withdraw")

    • date - Date of Transaction

    • time - Time of Transaction

    • amount - Amount Transferred

    • sender - Name of the Sender

    • receiver - Name of the Receiver


StoreTransaction

Description: 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