Resource icon

Free ASA Token Bank 1.1

No permission to download
This resource is free
Big credits To Michidu for the code concept!

Token Bank

This plugin was created mainly for other plugins to use as an API and central database for Tokens. As a plugin developer, if you have functions or commands you want to control by tokens, you can use this plugin's API to allow server owners to limit the use of specific commands.
Whether a command can be executed or not by a player depends on the amount of tokens that they have stored.
Server owners can decide to either set up different types of token, or have everything connected to one token type.

Plugins using TokenBanks:
More TBA

Dependencies:
MySQL / MariaDB

What it's supposed to do:
  • Store/control tokens in MySQL/MariaDB
  • Handle API to other plugins
  • Display tokens for players
  • More functions to come!

What it's not supposed to do:
  • Handle logic for tokens checks
  • Other plugins command

Commands:
Chat: /tokens - Display all tokens for the player

Console & RCON:
AddTokens <eos_id> <amount> <token_type> - Add the specified token type and the token amount
ChangeTokens <eos_id> <amount> <token_type> - Change the specified token type and the token amount (And updates Spent if it's decreasing)
SetTokens <eos_id> <amount> <token_type> - Sets the specified token type and the token amount (Updates only Tokens)
GetPlayerTokens <eos_id> <token_type> - Returns the specified token type and the token amount
ResetTokens - Resets All player's tokens to 0!

For Developers Only:
Token Bank API: https://cdn.discordapp.com/attachments/840771104829472858/845064403540115456/TokenBank_API.zip

C++:
bool TokenBank::Tokens::AddTokens (int amount, FString eos_id, std::string type)
Example: TokenBank::Tokens::AddTokens (10, eos_id, command_name)

bool TokenBank::Tokens::SpendTokens (int amount, FString eos_id, std::string type)
Example: TokenBank::Tokens::SpendTokens (10, eos_id, command_name)

bool TokenBank::Tokens::SetTokens(FString eos_id, int amount std::string type)
Example: TokenBank::Tokens::SpendTokens (10, eos_id, command_name)

int TokenBank::Tokens::GetTokens (FString eos_id, std::string type)
Example: TokenBank::Tokens::GetTokens (eos_id, command_name)

int TokenBank::Tokens::GetTotalSpentTokens (FString eos_id)
TokenBank::Tokens::GetTotalSpentTokens (eos_id)

Donate
Any donation is much appreciated and very helpful towards the upkeep/creation of the plugins i provide.

Author
Foppa
Downloads
17
Views
504
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Foppa

Back
Top