Make a chat hook in SSGM
//Example of a chat command using the ChatCommandClass.
//Remove this when making a real plugin.
class TestChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
/* Text is a tokenized version of the command paramter.
Text[1] would get the first word after the command.
Text[0] would get everything after the command.
Text(3) would get word 3 and everything after it.
Text(2,4) would get words 2 through 4.
*/
Console_Input(StrFormat("ppage %d loltest parameters: \"%s\"",ID,Text(1).c_str()).c_str());
}
};
ChatCommandRegistrant<TestChatCommand> TestChatCommandReg(
"!test", //Name of the command. Seperate multiple names with ;.
CHATTYPE_ALL, //What type of chat the command can be triggered in. CHATTYPE_ALL, CHATTYPE_TEAM, and CHATTYPE_PUBLIC.
1, //How many parameters the command needs. !Donate, for example, would need two. One would be the name of the player and the other would be the amount.
GAMEMODE_ALL //The game mode that this command can be used in.
);