File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments