We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34c1c2e commit b2c6585Copy full SHA for b2c6585
examples/Aim_Move_To_Target_Point.cpp
@@ -0,0 +1,25 @@
1
+void AimMoveToTargetPoint(int bestPlayerIndex){
2
+ if(bestPlayerIndex < 0) return;
3
+ const float x = g_pEsp->Players[bestPlayerIndex].PositionHeader.x - g_pOverlay->screen_centerX;
4
+ const float y = g_pEsp->Players[bestPlayerIndex].PositionHeader.y - g_pOverlay->screen_centerY;
5
+
6
+ std::async([](const float head_x, const float head_y){
7
+ float dx = head_x;
8
+ float dy = head_y;
9
10
+ INPUT input = { 0 };
11
12
+ input.mi.dx = dx * (dx > -10 && dx < 10 ? 0.1f : 0.5f);
13
+ input.mi.dy = dy * (dy > -10 && dy < 10 ? 0.1f : 0.5f);
14
15
+ input.mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_VIRTUALDESK;
16
+ input.type = INPUT_MOUSE;
17
18
+ SendInput(1, &input, sizeof INPUT);
19
20
21
+ Sleep(1);
22
23
+ }, x, y);
24
25
+}
0 commit comments