CSGO RCS
Hello guys! My RCS is not working. The it debuggs just fine without error but it doesn't do what it is supposed to do. If anyone could help me out it would be great.
Thx in advance
/Samlaren
Thx in advance
/Samlaren
Code:
#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
using namespace std;
typedef struct
{
float x, y, z;
}Vector;
int main()
{
DWORD clientState;
DWORD player{};
Vector viewAngle{};
Vector punchAngle{};
int shotsFired{};
DWORD m_dwLocalPlayer = 0x00A31504;
DWORD m_vecPunch = 0x00003018;
DWORD m_dwViewAngles = 0x00004D0C;
DWORD m_iShotsFired = 0x0000A2B0;
DWORD m_dwEnginePosition = 0x00664ABC;
DWORD pId;
HWND hwnd = FindWindow(NULL, "Counter-Strike: Global Offensive");
GetWindowThreadProcessId(hwnd, &pId);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, NULL, pId);
DWORD clientDll = getClientDll(pId);
DWORD engineDll = getEngineDll(pId);
ReadProcessMemory(hProc, (LPCVOID)(clientDll + m_dwLocalPlayer), &player, sizeof(player), NULL);
ReadProcessMemory(hProc, (LPCVOID)(player + m_vecPunch), &punchAngle, sizeof(punchAngle), NULL);
ReadProcessMemory(hProc, (LPCVOID)(player + m_iShotsFired), &shotsFired, sizeof(shotsFired), NULL);
ReadProcessMemory(hProc, (LPCVOID)(engineDll + m_dwEnginePosition), &clientState, sizeof(clientState), NULL);
ReadProcessMemory(hProc, (LPCVOID)(clientState + m_dwViewAngles), &viewAngle, sizeof(viewAngle), NULL);
Vector old{};
Vector towrite{};
while (true)
{
if ((GetAsyncKeyState(VK_LBUTTON) & 0x8000) && shotsFired > 1)
{
Vector view = viewAngle;
Vector punch = punchAngle;
view.x = view.x + old.x;
view.y = view.y + old.y;
towrite.x = view.x - punch.x * 2.0f;
towrite.y = view.y - punch.y * 2.0f;
WriteProcessMemory(hProc, (LPVOID)(clientState + m_dwViewAngles), &towrite, sizeof(towrite), NULL);
old.x = punch.x * 2.0f;
old.y = punch.y * 2.0f;
}
Sleep(1);
}
return 0;
}
