Quote:
Originally Posted by astropilote
You need to put the
if ( readvalue == true)
{
//Command contains here the /1 command for example
readvalue = false;
return;
}
On the top of the CheckCommand function
Other example:
Code:
bool readvalue = false;
void CheckCommand(Command)
{
if ( readvalue == true)
{
//Command contains here the /1 command for example
readvalue = false;
return;
}
if( strstr(Command, "/InfSp")
{
//Inf sp stuff
}
else if (strstr(Command, "/InfHp")
{
//Inf Hp stuff
}
else if (strstr(Command, "/blabla"))
{
readvalue = true;
//Show "[Request] Select a Value from xx to xx"
}
}
|
Thanks that you are helping me so much with this!!
Ok ok, it works, but another problem. I can't do it with more numbers..
I tryed 2 ways
current way :
Code:
BOOL AttackRequest = false;
void CheckCommand(char Command[20])
{
if (AttackRequest == true)
{
if (strstr(Command, "1") != nullptr)
AttackRequest = false;
WriteASM((DWORD)GetModuleHandle(0) + 0x####, (DWORD)"\x01", 1);
ChangeResponseConsole(" {CB-170,245,242,255}#####{CB-0,255,68,255} activated!", TypeBalise::Answer);
return;
}
if (AttackRequest == true)
{
if (strstr(Command, "2") != nullptr)
AttackRequest = false;
WriteASM((DWORD)GetModuleHandle(0) + 0x##### (DWORD)"\x02", 1);
ChangeResponseConsole(" {CB-170,245,242,255}#######{CB-0,255,68,255} activated!", TypeBalise::Answer);
return;
}
if (AttackRequest == true)
{
if (strstr(Command, "0") != nullptr)
AttackRequest = false;
WriteASM((DWORD)GetModuleHandle(0) + 0x#####, (DWORD)"\x03", 1);
ChangeResponseConsole(" {CB-170,245,242,255}#######{CB-0,255,68,255} deactivated!", TypeBalise::Answer);
return;
}
other way
Code:
BOOL AttackRequest = false;
void CheckCommand(char Command[20])
{
if (AttackRequest == true)
{
if (strstr(Command, "/1") != nullptr)
AttackRequest = false;
WriteASM((DWORD)GetModuleHandle(0) + 0x######, (DWORD)"\x01", 1);
ChangeResponseConsole(" {CB-170,245,242,255}#####{CB-0,255,68,255} activated!", TypeBalise::Answer);
return;
}
else if (AttackRequest == true)
{
if (strstr(Command, "/2") != nullptr)
AttackRequest = false;
WriteASM((DWORD)GetModuleHandle(0) + 0x#####, (DWORD)"\x02", 1);
ChangeResponseConsole(" {CB-170,245,242,255}#######{CB-0,255,68,255} activated!", TypeBalise::Answer);
return;
}
else if (AttackRequest == true)
{
if (strstr(Command, "/0") != nullptr)
AttackRequest = false;
WriteASM((DWORD)GetModuleHandle(0) + 0x######, (DWORD)"\x03", 1);
ChangeResponseConsole(" {CB-170,245,242,255}######{CB-0,255,68,255} deactivated!", TypeBalise::Answer);
return;
}
both dont work. :c