Jump to content

Developer API

API Methods

  • bool Deposit(string playerID, int amount) Returns true if successful.
  • bool Deposit(string playerID, int amount, ulong toolCupboardID) Returns true if successful.
  • bool Withdraw(string playerID, int amount) Returns true if successful.
  • bool Withdraw(string playerID, int amount, ulong toolCupboardID) Returns true if successful.
  • bool AddToWallet(string playerID, int amount) Returns true if successful.
  • bool AddToBank(string playerID, int amount) Returns true if successful.
  • bool AddToBank(string playerID, int amount, ulong toolCupboardID) Returns true if successful.
  • bool RemoveFromWallet(string playerID, int amount) Returns true if successful.
  • bool RemoveFromBank(string playerID, int amount) Returns true if successful.
  • bool RemoveFromBank(string playerID, int amount, ulong toolCupboardID) Returns true if successful.
  • bool ResetWallet(string playerID) Returns true if successful.
  • bool ResetBank(string playerID) Returns true if successful.
  • int GetWalletBalance(string playerID) Returns player's wallet balance.
  • int GetBankBalance(string playerID) Returns player's bank balance.
  • int GetBankBalance(string playerID, ulong toolCupboardID) Returns player's bank balance.
  • void RefreshOverlay(string playerID) Refreshes a player's balance overlay GUI.

Which API methods to use?

There are many API methods available but the three below are the most commonly used in place of Economics and ServerRewards method calls.

Check player's balance

  • int GetWalletBalance(string playerID) Returns player's wallet balance.

Remove money from player's balance

  • bool RemoveFromWallet(string playerID, int amount) Returns true if successful.

Add money to player's balance

  • bool AddToWallet(string playerID, int amount) Returns true if successful.

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.9m
Total downloads
Customers
11.9k
Customers served
Files Sold
169.6k
Total sales
Payments
3.7m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.