This is what ım trying to do;

C++:

```
Vector between PlayerVector And Enemy Vector= (PlayerX-EnemyX), (PlayerY-EnemyY), (PlayerZ-EnemyZ)= (X, Y, Z)
Distance=sqrt(X^2+Y^2+Z^2)
For Crosshair X= arctan(Y/X)*180/PI
For Crosshair Y=arccos(Z/Distance)*180/PI
```

C++:

```
#include <iostream>
#include <windows.h>
#include <cmath>
using namespace std;
int main(){
float PlayerX=0, PlayerY=0, PlayerZ=0, CrosshairX=0, CrosshairY=0, EnemyX=0, EnemyY=0, EnemyZ=0, X, Y, Z, AimX, AimY,Distance;
HWND hwnd=FindWindowA(NULL, "Counter-Strike Source");
DWORD procID;
GetWindowThreadProcessId(hwnd, &procID);
HANDLE handle=OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
ReadProcessMemory(handle, (LPVOID)(0x6477AB70), &PlayerX, sizeof(float), 0);
ReadProcessMemory(handle, (LPVOID)(0x6477AB74), &PlayerY, sizeof(float), 0);
ReadProcessMemory(handle, (LPVOID)(0x6477AB78), &PlayerZ, sizeof(float), 0);
ReadProcessMemory(handle, (LPVOID)(0x660A32D4), &Corsshairx, sizeof(float), 0);
ReadProcessMemory(handle, (LPVOID)(0x660A32D8), &CrosshairY, sizeof(float), 0);
ReadProcessMemory(handle, (LPVOID)(0x6477AB94), &EnemyX, sizeof(float), 0);
ReadProcessMemory(handle, (LPVOID)(0x6477AB98), &EnemyY, sizeof(float), 0);
ReadProcessMemory(handle, (LPVOID)(0x6477AB9C), &EnemyZ, sizeof(float), 0);
X=DusmanX-PlayerX;
Y=DusmanY-PlayerY;
Z=DusmanZ-PlayerZ;
Distance=sqrt(pow(X,2)+pow(Y,2)+pow(Z,2));
AimX= atan(Y/X)*180/M_PI;
AimY= acos(Z/Distance)*180/M_PI;
WriteProcessMemory(handle, (LPVOID)0x660A32D4, &AimX, sizeof(float), 0);
WriteProcessMemory(handle, (LPVOID)0x660A32D8, &AimY, sizeof(float), 0);
system("pause");
return 0;
}
```