Código:
void ChatDataSend(DWORD PlayerID,LPBYTE Protocol)
{
// /Post Command
GetPrivateProfileString("GameServerInfo","Sintax do Comando </post>",g_PostCommandText,g_PostCommandText,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],g_PostCommandText,strlen(g_PostCommandText)))
{
Post(PlayerID,(char*)Protocol+13+strlen(g_PostCommandText));
}
// /Make Command
char CommandMake[64];
GetPrivateProfileString("GameServerInfo","Sintax do Comando </make>",CommandMake,CommandMake,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],CommandMake,strlen(CommandMake)))
{
Make(PlayerID,(char*)Protocol+13+strlen(CommandMake));
}
// /Add Command
GetPrivateProfileString("GameServerInfo","Sintax do Comando </addstr>",g_AddStrText,g_AddStrText,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],g_AddStrText,strlen(g_AddStrText)))
{
AddStats(PlayerID,(char*)Protocol+13+strlen(g_AddStrText),0);
}
GetPrivateProfileString("GameServerInfo","Sintax do Comando </addagi>",g_AddAgiText,g_AddAgiText,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],g_AddAgiText,strlen(g_AddAgiText)))
{
AddStats(PlayerID,(char*)Protocol+13+strlen(g_AddAgiText),1);
}
GetPrivateProfileString("GameServerInfo","Sintax do Comando </addvit>",g_AddVitText,g_AddVitText,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],g_AddVitText,strlen(g_AddVitText)))
{
AddStats(PlayerID,(char*)Protocol+13+strlen(g_AddVitText),2);
}
GetPrivateProfileString("GameServerInfo","Sintax do Comando </addeng>",g_AddEneText,g_AddEneText,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],g_AddEneText,strlen(g_AddEneText)))
{
AddStats(PlayerID,(char*)Protocol+13+strlen(g_AddEneText),3);
}
GetPrivateProfileString("GameServerInfo","Sintax do Comando </addcmd>",g_AddCmdText,g_AddCmdText,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],g_AddCmdText,strlen(g_AddCmdText)))
{
AddStats(PlayerID,(char*)Protocol+13+strlen(g_AddCmdText),4);
}
// /News Command
char CommandNews[64];
GetPrivateProfileString("GameServerInfo","Sintax do Comando </news>",CommandNews,CommandNews,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],CommandNews,strlen(CommandNews)))
{
News(PlayerID);
}
// /Online Command
char CommandOnlinePlayers[64];
GetPrivateProfileString("GameServerInfo","Sintax do Comando </online>",CommandOnlinePlayers,CommandOnlinePlayers,64,".\\Extras\\Commands.script");
if(!memcmp(&Protocol[13],CommandOnlinePlayers,strlen(CommandOnlinePlayers)))
{
Online(PlayerID);
}
}
Estando assim se eu executar o /post ele vai executar o /post + os 5 comandos de adicionar.