Hey,
I'm working on an aimbot atm and I got stuck.
I would be very glad if you could help me :D !

I got my own headposition.

Code:

myheadposition[0] = myPlayer.Position[0]; //x
myheadposition[1] = myPlayer.Position[1]; //y
myheadposition[2] = myPlayer.Position[2] + myPlayer.vecViewheigh[2]; //z

And the Enemys Bone 10 Position (Bone 10 = Head)
Code:

float BonePosition[3];

ReadProcessMemory(Process_Dll.ProcessHandle, (PBYTE*)(Playerlist[Player].Playerlist + BoneMatrix), &Bones, sizeof(DWORD), NULL);
ReadProcessMemory(Process_Dll.ProcessHandle, (PVOID)(Bones + 0x30 * BoneId + 0xC), &BonePosition[0], sizeof(float), NULL); //x
ReadProcessMemory(Process_Dll.ProcessHandle, (PVOID)(Bones + 0x30 * BoneId + 0x1C), &BonePosition[1], sizeof(float), NULL); //y
ReadProcessMemory(Process_Dll.ProcessHandle, (PVOID)(Bones + 0x30 * BoneId + 0x2C), &BonePosition[2], sizeof(float), NULL); //z

I also want to know if there are bether ways to get the headpositions.

My question is how to calculate the new viewangles (Pitch and YAW) that aim at the head of the enemy with the local headposition and the enemys headposition so I can write it into the Clientstate + Viewoffset.

Thank you very MUCH :popworm::popworm:



Original Writen by Scottm in Counterstrike Global Offensive Category, the date of 23-06-2015 12:29.