Solved Natural autostrafe C++ problem

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

habit

Newbie
Full Member
Oct 30, 2012
28
308
0
Im having a issue getting a synced strafe, one that naturally transitions like I can do regulary and move forward properly

This is gonna be tied in with a gstrafe or Sgstrafe
I've been trying for the past 3 days, I just cant get the darn thing to work properly
Please help

void strafe() {

if (GetAsyncKeyState(VK_XBUTTON1))
{
strafy = !strafy;
Sleep(250);
}
if (GetKeyState(VK_XBUTTON1))
{
strafy = true;
}
if (!strafy)
return;

if (true){

mouse_event(MOUSEEVENTF_ABSOLUTE, 450, 0, 0, 0);

keybd_event(A, MapVirtualKey(A, 0), o, 0); //+moveleft
Sleep(135);
keybd_event(A, MapVirtualKey(A, 0), x, 0);

mouse_event(MOUSEEVENTF_ABSOLUTE, -450, 0, 0, 0);
keybd_event(D, MapVirtualKey(D, 0), o, 0); //+moveright
Sleep(135);

keybd_event(D, MapVirtualKey(D, 0), x, 0);

return;








}




}
https://www.youtube.com/watch?v=d5FBfE_43EI
 
Last edited:

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
so basicly autostrafe is like when you move you mouse to the left, it should press A and if you move it right it should press D .... (as long I can trust google)
so basicly you check for your mouse-position in that case and while X increments, means goes to right, you just spam D and when X decrements you spam A .. :Q_

C++:
POINT Cur;
GetCursorPos(&Cur);
ScreenToClient(GetForegroundWindow(), &Cur);
 

habit

Newbie
Full Member
Oct 30, 2012
28
308
0
I got everything working, but i have a little issue I cant seem to wrap my head around,

When I run my hack, it works as the 2 cursors pos alternate, but when I join a different server, or reconnect to a server, the Cursor position changes to a random value,
I have to alt tab out of the game and tab back in for the hack to work again and the cursor positions reset somehow, I tried setting positions, but that didnt work as planned.

I tried for 3 hours, and I cant seem to figure wtf alt tabbing does for it, makes no logical sense

any suggestion would be appreciated :)


---------
I managed to fix it with some math, but I still would like to know how to reset the cursor allowed position, after I switch servers its changes the X pos from 399- 400 to 0 - 799, so the varies huge when it does this, But SetCursorPos about 4 5 times fixes it.
 
Last edited:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods