Stupid edit button disappeared >.>
Nevermind on the "Commands->____" part xD.
Where can I find a list of the -exact- parameters of the Commands-> function?
Also, I need help with the donate command...Logic is working, but I don't know the correct syntax for some of the Commands->___
ie: What do I put for the "GameObject *" parameter when giving money to another player that doesn't trigger the command.
class DonateChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
// Usage: !donate <nick> <amt>
// Text[1] - Nick
// Text[2] - Amt
int Amt = Text[2];
char Nick[20] = Commands->Get_ID(Text[1]);
Commands->Give_Money(ID,Commands->Get_Money(ID)-Amt), true);
Commands->Give_Money(ID,Commands->Get_Money(ID)+Amt), true);
Console_Input(StrFormat("ppage %d You have donated %d credits to %d.",ID,Text[2],Text[1]).c_str());
Console_Input(StrFormat("ppage %d %d has donated you %d credits.",Nick,ID,Text[2]).c_str());
}
}
ChatCommandRegistrant<DonateChatCommand> DonateChatCommandReg("!don8;!donat;!doante;!donate;!d",CHATTYPE_TEAM,2,GAMEMODE_ALL);