Can someone help me with this? I'm trying to figure out how to add commands and I think figured it out, but don't know the syntax for adding commands.
void Chat(int ID, TextMessageEnum Type, const wchar_t *Msg2) {
if (!Data->Plugins.empty()) {
std::vector<PluginInfo*>::const_iterator it;
for (it = Data->Plugins.begin();it != Data->Plugins.end(); ++it) {
if ((*it)->Type == Plugin) {
if ((*it)->ChatHookHandle) {
(*it)->ChatHookHandle(ID,Type,Msg2);
}
}
}
}
if (Type == 2) {
return;
}
if (Settings->Gamelog && Settings->NewGamelog) {
Gamelog_Chat_Hook(ID,Type,Msg2);
}
std::string Msg = WideCharToString(Msg2);
if (Msg[0] == '!' && !Data->Commands.empty()) {
TokenClass Text(Msg);
std::string Command = Text[1];
Text.erase(1);
Data->Trigger_Chat_Command(ID,Type,Command,Text);
}
}
I'm pretty sure that this is where I'd add the commands, but don't know the syntax. :/
if (Type == 2) {
return;
}
-MathK1LL