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);
}
}
}
}
if ( Cmd->MousedX > 0 ) {
Cmd->ViewAngles.y += 1;
Cmd->SideMove = 450.f;
}
if ( Cmd->MousedX < 0 ) {
Cmd->ViewAngles.y -= 1;
Cmd->SideMove = -450.f;
}
[ 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?