External Strafe Hack
Hey. I ask to help me with strafe hack. I wrote a program, but it has significant disadvantages.
For example the fact that the keys "A" and "D" pressed out of the game and also pressed on the console, and chat.
Yet it is not entirely effective, often miss clicks.
I have some questions:
1) How to best emulated keystrokes to the game?
2) how to do it so the most efficient and that the console is in the chat and keys are not pressed?
here is my shit code:
For example the fact that the keys "A" and "D" pressed out of the game and also pressed on the console, and chat.
Yet it is not entirely effective, often miss clicks.
I have some questions:
1) How to best emulated keystrokes to the game?
2) how to do it so the most efficient and that the console is in the chat and keys are not pressed?
here is my shit code:
Code:
void StrafeHack()
{
if (StrafeHackEnable)
{
if (FirstTimeSH)
{
int Xc = GetSystemMetrics(SM_CXSCREEN);
int Yc = GetSystemMetrics(SM_CYSCREEN);
int _x = Xc / 2;
int _y = Yc / 2;
SetCursorPos(_x, _y);
GetCursorPos(&CenterOfScreen);
FirstTimeSH = false;
}
if (GetAsyncKeyState(VK_SPACE) & (1 << 15)) // & (1 << 15)
{
GetCursorPos(&CurrentPosition);
if (CurrentPosition.x > CenterOfScreen.x)
{
SendKeyPress(0x20, true);
Sleep(5);
SendKeyPress(0x20, false);
}
else if (CurrentPosition.x < CenterOfScreen.x)
{
SendKeyPress(0x1e, true);
Sleep(5);
SendKeyPress(0x1e, false);
}
}
}
}

[ btw i didnt really look at the code ] the way you do it is similar to the way i suggested anyways, the way you do it seems to be good, is there any type of bugs to it?