simple rcs hack with updated offsets doesnt work?

Posts 16 of 6 · Page 1 of 1
simple rcs hack with updated offsets doesnt work?
 
CODE
Code:
#include "Vector.h"
#include "ProcMem.h"

//	is hack enabled?
bool rcsEnabled = false;

//	offsets
DWORD dwLocalPlayer = 0xAB0708;
DWORD m_iShotsFired = 0xA2C0;
DWORD oViewAngles = 0x4D0C;
DWORD m_viewPunchAngle = 0x3010;
DWORD dwClientState = 0x5CC524;

//	MEMORY STUFF
ProcMem mem;
DWORD Client;
DWORD Engine;
DWORD EngineBase;
// DWORD myPlayer;

//	RCS vars
Vector angle;
Vector m_ViewAngle;
Vector OldAngle;
int ShotsFired = 0;

//	prototypes -_-
void RCS(); 

int main() {
	mem.Process("csgo.exe");	//	Find csgo
	Sleep(200);
	Client = mem.Module("client.dll");	//	Find client.dll module
	Sleep(200);
	Engine = mem.Module("engine.dll");	//	Find engine.dll module
	while (1) {
		Sleep(1);
		RCS();
	}
		
}

void RCS() {
	EngineBase = mem.Read<DWORD>(Engine + dwClientState);
	ShotsFired = mem.Read<int>((Client + dwLocalPlayer) + m_iShotsFired);

	if (GetAsyncKeyState(0x01)) {
		//std::cout << "Button pressed!" << std::endl;
		if (ShotsFired > 1) {

			m_ViewAngle = mem.Read<Vector>(EngineBase + oViewAngles);
			Vector m_PunchAngle = mem.Read<Vector>((Client + dwLocalPlayer) + m_viewPunchAngle);

			m_ViewAngle.x += OldAngle.x;
			m_ViewAngle.y += OldAngle.y;

			// Add the old "viewpunch" so we get the "center" of the screen again
			angle.x = m_ViewAngle.x - m_PunchAngle.x * 2;
			angle.y = m_ViewAngle.y - m_PunchAngle.y * 2;

			// remove the new "viewpunch" from the viewangles
			mem.Write<Vector>(EngineBase + oViewAngles, angle);

			OldAngle.x = m_PunchAngle.x * 2;
			OldAngle.y = m_PunchAngle.y * 2;
		}
		else {
			OldAngle.x = 0;
			OldAngle.y = 0;
		}
	}
	else {
		OldAngle.x = 0;
		OldAngle.y = 0;
	}
}


this is my code with updated offsets, but i cant make it work... please point where i did mistake
Thank you.
Quote Originally Posted by certmemer View Post
""my code""
oh sorry lol. what i meant was, the code i was using .. my bad
the code you copied off ***** is outdated.

try this
Code:
void rcs(float* angles)
{
	float MyPunch[2];

	MyPunch[0] = local_player->getPunch()[0];
	MyPunch[1] = local_player->getPunch()[1];
	angles[0] = local_player->getAngles()[0] - (MyPunch[0] - old[0]) * 1.3f;
	angles[1] = local_player->getAngles()[1] - (MyPunch[1] - old[1]) * 1.3f;
	angles[2] = 0.0f;

	engine->clampAngles(angles);

	old[0] = MyPunch[0];
	old[1] = MyPunch[1];

	local_player->setAngles(angles);
	
	Sleep(1);
}
Code:
float* CLocalPlayer::getPunch()
{
	float punch[3];
	ReadProcessMemory(mem->hProcess, (PBYTE*)(local + m_vecPunch), &punch, sizeof(float) * 3, 0);
	return punch;
}
Code:
float* CLocalPlayer::getAngles()
{
	float ang[3];
	ReadProcessMemory(mem->hProcess, (PBYTE*)(getEnginePointer() + m_dwViewAngles), &ang, sizeof(float) * 3, 0);
	return ang;
}
thats my code, go figure out your self how to add it to your own code.

its external btw.
Quote Originally Posted by sagaantheepic4 View Post
the code you copied off unknown cheats is outdated.

try this
Code:
void rcs(float* angles)
{
	float MyPunch[2];

	MyPunch[0] = local_player->getPunch()[0];
	MyPunch[1] = local_player->getPunch()[1];
	angles[0] = local_player->getAngles()[0] - (MyPunch[0] - old[0]) * 1.3f;
	angles[1] = local_player->getAngles()[1] - (MyPunch[1] - old[1]) * 1.3f;
	angles[2] = 0.0f;

	engine->clampAngles(angles);

	old[0] = MyPunch[0];
	old[1] = MyPunch[1];

	local_player->setAngles(angles);
	
	Sleep(1);
}
Code:
float* CLocalPlayer::getPunch()
{
	float punch[3];
	ReadProcessMemory(mem->hProcess, (PBYTE*)(local + m_vecPunch), &punch, sizeof(float) * 3, 0);
	return punch;
}
Code:
float* CLocalPlayer::getAngles()
{
	float ang[3];
	ReadProcessMemory(mem->hProcess, (PBYTE*)(getEnginePointer() + m_dwViewAngles), &ang, sizeof(float) * 3, 0);
	return ang;
}
thats my code, go figure out your self how to add it to your own code.

its external btw.
Thank you for replying.. i understood most of the part, now i need some time before applying it

but this part i do not understand

Code:
 
...
engine->clampAngles(angles); 
...
is this part equivalent to the code im using engineBase?
sagaantheepic4,

i got my rcs to a working state now.
really big thanks to you!
Posts 16 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?