API features:
- Add credits to the user.
- Take credits from user.
- Find out the quantity of credits from user.
- Find out if user is registered on the forum.
Requirements:
User credits should be in the xf_user table.
Installation:
In the plugin core there is #define CURRENCY_ID 2 - you need to insert the ID of your credits there.
databases.cfg:
Code:
"xf_credits"
{
"driver" "mysql"
"host" " "
"database" " "
"user" " "
"pass" " "
}
Usage example:
Code:
public Action Command_Test_Take(int client, int args)
{
Xf_TakeCredits(client, 100, true, "test_event", "%N", client);
return Plugin_Handled;
}
bVisibility - whether to display information in the transaction log*
In this example, 100 credits will be taken from the player, this will be shown in the transaction log.
The transaction name will be: test_event.
And in the additional message will be the name of the player.