CSGO RCS

Posts 1–15 of 16 · Page 1 of 2
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


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;
}
All of your RPM functions should be inside your while loop. When your function is in a while(true), it is using old values, if that makes any sense. Like this:

Code:
while (true)
	{
		if ((GetAsyncKeyState(VK_LBUTTON) & 0x8000) && shotsFired > 1)
		{
                        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 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);
	}
Quote Originally Posted by KappaMang View Post
All of your RPM functions should be inside your while loop. When your function is in a while(true), it is using old values, if that makes any sense. Like this:

Code:
while (true)
	{
		if ((GetAsyncKeyState(VK_LBUTTON) & 0x8000) && shotsFired > 1)
		{
                        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 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);
	}
Wow... must have been really late last night. But it still does not work.
"Doesn't work".

And what specifically doesn't work? Are you aiming straight to the ground? Are you aiming straight into nowhere? Is it not aiming at all?
Quote Originally Posted by WasserEsser View Post
"Doesn't work".

And what specifically doesn't work? Are you aiming straight to the ground? Are you aiming straight into nowhere? Is it not aiming at all?
it just sprays normal, either the angles are not written or the angles that are written are wrong.
Quote Originally Posted by samlarenskoog View Post
it just sprays normal, either the angles are not written or the angles that are written are wrong.
Code:
while (true)
	{
		ReadProcessMemory(hProc, (LPCVOID)(player + m_iShotsFired), &shotsFired, sizeof(shotsFired), NULL);
		
		if ((GetAsyncKeyState(VK_LBUTTON) & 0x8000) && shotsFired > 1)
		{
                        ReadProcessMemory(hProc, (LPCVOID)(clientDll + m_dwLocalPlayer), &player, sizeof(player), NULL);
			ReadProcessMemory(hProc, (LPCVOID)(player + m_vecPunch), &punchAngle, sizeof(punchAngle), NULL);

			ReadProcessMemory(hProc, (LPCVOID)(engineDll + m_dwEnginePosition), &clientState, sizeof(clientState), NULL);
			ReadProcessMemory(hProc, (LPCVOID)(clientState + m_dwViewAngles), &viewAngle, sizeof(viewAngle), NULL);

			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);
	}
Quote Originally Posted by WasserEsser View Post
Code:
while (true)
	{
		ReadProcessMemory(hProc, (LPCVOID)(player + m_iShotsFired), &shotsFired, sizeof(shotsFired), NULL);
		
		if ((GetAsyncKeyState(VK_LBUTTON) & 0x8000) && shotsFired > 1)
		{
                        ReadProcessMemory(hProc, (LPCVOID)(clientDll + m_dwLocalPlayer), &player, sizeof(player), NULL);
			ReadProcessMemory(hProc, (LPCVOID)(player + m_vecPunch), &punchAngle, sizeof(punchAngle), NULL);

			ReadProcessMemory(hProc, (LPCVOID)(engineDll + m_dwEnginePosition), &clientState, sizeof(clientState), NULL);
			ReadProcessMemory(hProc, (LPCVOID)(clientState + m_dwViewAngles), &viewAngle, sizeof(viewAngle), NULL);

			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);
	}

Still not working, I have no idea what is wrong :/

Code right now:
Code:
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);
	Vector old{};
	Vector towrite{};
	


while (true)
	{
		ReadProcessMemory(hProc, (LPCVOID)(clientDll + m_dwLocalPlayer), &player, sizeof(player), NULL);
		ReadProcessMemory(hProc, (LPCVOID)(player + m_iShotsFired), &shotsFired, sizeof(shotsFired), NULL);
		
		if ((GetAsyncKeyState(VK_LBUTTON) & 0x8000) && shotsFired > 1)
		{
            
			ReadProcessMemory(hProc, (LPCVOID)(player + m_vecPunch), &punchAngle, sizeof(punchAngle), NULL);

			ReadProcessMemory(hProc, (LPCVOID)(engineDll + m_dwEnginePosition), &clientState, sizeof(clientState), NULL);
			ReadProcessMemory(hProc, (LPCVOID)(clientState + m_dwViewAngles), &viewAngle, sizeof(viewAngle), NULL);

			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;
}
Quote Originally Posted by samlarenskoog View Post
Still not working, I have no idea what is wrong :/

Code right now:
Code:
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);
	Vector old{};
	Vector towrite{};
	


while (true)
	{
		ReadProcessMemory(hProc, (LPCVOID)(clientDll + m_dwLocalPlayer), &player, sizeof(player), NULL);
		ReadProcessMemory(hProc, (LPCVOID)(player + m_iShotsFired), &shotsFired, sizeof(shotsFired), NULL);
		
		if ((GetAsyncKeyState(VK_LBUTTON) & 0x8000) && shotsFired > 1)
		{
            
			ReadProcessMemory(hProc, (LPCVOID)(player + m_vecPunch), &punchAngle, sizeof(punchAngle), NULL);

			ReadProcessMemory(hProc, (LPCVOID)(engineDll + m_dwEnginePosition), &clientState, sizeof(clientState), NULL);
			ReadProcessMemory(hProc, (LPCVOID)(clientState + m_dwViewAngles), &viewAngle, sizeof(viewAngle), NULL);

			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;
}
Debug it, debugging would tell you exactly where your problem is.
Quote Originally Posted by WasserEsser View Post
Debug it, debugging would tell you exactly where your problem is.
debugging it is no problem
Quote Originally Posted by samlarenskoog View Post
debugging it is no problem
No, that's wrong.
Quote Originally Posted by samlarenskoog View Post
Code:
WriteProcessMemory(hProc, (LPVOID)(clientState + m_dwViewAngles), &towrite, sizeof(towrite), NULL);
im not too sure but i think you cant go with sizeof(towrite), change it to sizeof(Vector3).
Quote Originally Posted by derkrasseboy View Post
im not too sure but i think you cant go with sizeof(towrite), change it to sizeof(Vector3).
sizeof( variable ) will return the size of the variable, which is the same as if you would use the type.

- - - Updated - - -

Quote Originally Posted by samlarenskoog View Post
That's not how you debug. Breakpoint, step through the code, look into the variables that are getting read, look at what OpenProcess / ReadProcessMemory / WriteProcessMemory returns, look at the flow of your code, which if statements are taken and which aren't etc..
SOLVED /msg2short
@samlarenskoog, you can only bump your thread once every 24 hours.
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us