HelpExternal RCS not working

Posts 1–15 of 47 · Page 1 of 4
External RCS not working
so im adding new features to my public cheat and to see how some are working im looking at other sources and trying to get them to work in my cheat. so im wondering why this rcs isnt working

code:
Code:
typedef struct {
	float x, y, z;
}Vector;

using namespace std;
using std::vector;

Vector vAimPunch;
Vector Fin;


void SetViewAngles(Vector angle)
{
	Vector newAngle = angle;
	if (newAngle.x >= -180 && newAngle.x <= 180 && newAngle.y >= -180 && newAngle.y <= 180)
	{
		Mem.Write<Vector>(Engine + setView, angle);
	}
}

void RCS()
{
	if (RCSEnabled)
	{
			DWORD Player = Mem.Read<DWORD>(Client + LocalPlayer);
			static Vector vOldPunchAngle;

			if (GetAsyncKeyState(VK_LBUTTON))
			{
				vAimPunch = Mem.Read<Vector>(Player + AimPunch);
				vAimPunch.x = vAimPunch.x * 2.f;
				vAimPunch.y = vAimPunch.y * 2.f;

				Vector ViewAngles = Mem.Read<Vector>(Engine + setView);

				Fin.x = ViewAngles.x - (vAimPunch.x - vOldPunchAngle.x);
				Fin.y = ViewAngles.y - (vAimPunch.y - vOldPunchAngle.y);
				SetViewAngles(Fin);

				vOldPunchAngle = vAimPunch;
			}
			else
			{
				vOldPunchAngle.x = 0;
				vOldPunchAngle.y = 0;
				Fin.x = 0;
				Fin.y = 0;
			}
	}
	
}
offsets:
Code:
/* Changing */
DWORD LocalPlayer = 0x00A844DC;
DWORD EntityList = 0x04A9F6D4;
DWORD GlowObjectBase = 0x04FB556C;
DWORD attack = 0x02EDF6D0;
DWORD jump = 0x04F34A68;
DWORD sensitivity = 0x00A89CE4;
DWORD Mouse = 0x00A89D40;
DWORD ClientState = 0x00610334;
DWORD AimPunch = 0x3108;
DWORD setView = 0x4D0C;

DWORD ViewMatrix = 0x04A91264; // ViewMatrix offset
DWORD ViewMatrix1 = 0x04A91264;

DWORD ViewMatrix2 = 0x04A91374;
DWORD ViewMatrix3 = 0x04A91684;
DWORD iHealth = 0xFC; // iHealth offset [Always: 0xFC]
DWORD iTeamNum = 0xF0; // Team offset [Always: 0xF0]
DWORD ArmorValue = 0xA9E8; // Armor Value [Cuz cool?]
DWORD IsDormant = 0xE9; // Is dormant or na? [Always: 0xE9]
DWORD vecOrigin = 0x134;// vecOrigin offset [Always: 0x134];

/* Constant */
DWORD ViewAngle = 0x4D0C;
DWORD LocalPlayerIndex_a = 0x178;
DWORD m_iCrossHairID = 0xAA44;
DWORD ShotsFired = 0xA2B0;
DWORD m_iTeamNum = 0xF0;
DWORD m_fFlags = 0x100;
DWORD GlowIndex = 0xA310;
DWORD isDormant = 0xE9;
DWORD bSpotted = 0x939;
DWORD bSpottedByMask = 0x97C;
DWORD FlashMaxAlpha = 0xA2F4;
DWORD dw_EntityLoopDistance = 0x10;
DWORD dw_healthOffset = 0xFC;
DWORD m_vecOrigin = 0x134;
DWORD m_iFOV = 0x31C8;
DWORD punch = 0x300C;
DWORD DrawViewmodel = 0x3033;
DWORD ZoomLevel = 0x3330;
DWORD WeaponID = 0x0030;
DWORD BoneMatrix = 0x2698;
DWORD EnginePosition = 0x006BEB3C;
float dwAngPtr;

DWORD EnginePointer;
DWORD VectorPunch;
any help would be appreciated! thanks
I assume Engine is engine.dll? Add ClientState to it and you'll get a proper address.
Quote Originally Posted by Epik View Post
I assume Engine is engine.dll? Add ClientState to it and you'll get a proper address.
where should i add it exactly?
Quote Originally Posted by ImWhacky View Post
where should i add it exactly?
Code:
Mem.Write<Vector>((Engine + ClientState) + setView, angle);
or

Code:
DWORD dwClientState = Engine + ClientState;
Mem.Write<Vector>(dwClientState + setView, angle);
Quote Originally Posted by Epik View Post
Code:
Mem.Write<Vector>((Engine + ClientState) + setView, angle);
or

Code:
DWORD dwClientState = Engine + ClientState;
Mem.Write<Vector>(dwClientState + setView, angle);
just tried it, its still not working
Quote Originally Posted by ImWhacky View Post
just tried it, its still not working
Code:
Vector ViewAngles = Mem.Read<Vector>(Engine + setView);
Also properly normalize/clamp your angles instead of doing that horrific check at SetViewAngles(Vector angle).
Quote Originally Posted by Epik View Post


Code:
Vector ViewAngles = Mem.Read<Vector>(Engine + setView);
Also properly normalize/clamp your angles instead of doing that horrific check at SetViewAngles(Vector angle).
how would i do that? sorry im new at writing angles
Quote Originally Posted by ImWhacky View Post
how would i do that? sorry im new at writing angles
Angles are safe to set if the pitch (x) ranges from -89 to 89, yaw (y) being -180 to 180 and the roll (z) always being 0.

Knowing that, you can come up with something like this:
Code:
if (vecAngle.x > 89.f)
    vecAngle.x = 89.f;

etc
Yaw can be done the same way but it's (probably) better to loop the addition or subtraction of said angle with 360 until it is in bounds instead of forcing -180/180.
Quote Originally Posted by Epik View Post


Angles are safe to set if the pitch (x) ranges from -89 to 89, yaw (y) being -180 to 180 and the roll (z) always being 0.

Knowing that, you can come up with something like this:
Code:
if (vecAngle.x > 89.f)
    vecAngle.x = 89.f;

etc
Yaw can be done the same way but it's (probably) better to loop the addition or subtraction of said angle with 360 until it is in bounds instead of forcing -180/180.
ok, ill try this when i get home
Quote Originally Posted by Epik View Post


Angles are safe to set if the pitch (x) ranges from -89 to 89, yaw (y) being -180 to 180 and the roll (z) always being 0.

Knowing that, you can come up with something like this:
Code:
if (vecAngle.x > 89.f)
    vecAngle.x = 89.f;

etc
Yaw can be done the same way but it's (probably) better to loop the addition or subtraction of said angle with 360 until it is in bounds instead of forcing -180/180.
ok so this is what i have now:
Code:
#pragma once
#include "Offsets.h"
#include <math.h>
#include <iostream>
#include <string>
#include <ios>
#include <iomanip>
#include <vector>

typedef struct {
	float x, y, z;
}Vector;

using namespace std;
using std::vector;

Vector vAimPunch;
Vector Fin;

void RCS()
{
	if (RCSEnabled)
	{
			DWORD Player = Mem.Read<DWORD>(Client + LocalPlayer);
			static Vector vOldPunchAngle;

			if (GetAsyncKeyState(VK_LBUTTON))
			{
				vAimPunch = Mem.Read<Vector>(Player + AimPunch);
				vAimPunch.x = vAimPunch.x * 2.f;
				vAimPunch.y = vAimPunch.y * 2.f;

				Vector ViewAngles = Mem.Read<Vector>(Engine + setView);

				Fin.x = ViewAngles.x - (vAimPunch.x - vOldPunchAngle.x);
				Fin.y = ViewAngles.y - (vAimPunch.y - vOldPunchAngle.y);
				if (Fin.x >= -89 && Fin.x <= 89 && Fin.y >= -180 && Fin.y <= 180)
				{
					Mem.Write<Vector>((Engine + ClientState) + setView, Fin);
				}

				vOldPunchAngle = vAimPunch;
			}
			else
			{
				vOldPunchAngle.x = 0;
				vOldPunchAngle.y = 0;
				Fin.x = 0;
				Fin.y = 0;
			}
	}
	
}
its still not working.
Quote Originally Posted by ImWhacky View Post
ok so this is what i have now:
Code:
#pragma once
#include "Offsets.h"
#include <math.h>
#include <iostream>
#include <string>
#include <ios>
#include <iomanip>
#include <vector>

typedef struct {
	float x, y, z;
}Vector;

using namespace std;
using std::vector;

Vector vAimPunch;
Vector Fin;

void RCS()
{
	if (RCSEnabled)
	{
			DWORD Player = Mem.Read<DWORD>(Client + LocalPlayer);
			static Vector vOldPunchAngle;

			if (GetAsyncKeyState(VK_LBUTTON))
			{
				vAimPunch = Mem.Read<Vector>(Player + AimPunch);
				vAimPunch.x = vAimPunch.x * 2.f;
				vAimPunch.y = vAimPunch.y * 2.f;

				Vector ViewAngles = Mem.Read<Vector>(Engine + setView);

				Fin.x = ViewAngles.x - (vAimPunch.x - vOldPunchAngle.x);
				Fin.y = ViewAngles.y - (vAimPunch.y - vOldPunchAngle.y);
				if (Fin.x >= -89 && Fin.x <= 89 && Fin.y >= -180 && Fin.y <= 180)
				{
					Mem.Write<Vector>((Engine + ClientState) + setView, Fin);
				}

				vOldPunchAngle = vAimPunch;
			}
			else
			{
				vOldPunchAngle.x = 0;
				vOldPunchAngle.y = 0;
				Fin.x = 0;
				Fin.y = 0;
			}
	}
	
}
its still not working.
I already told you to use the proper clientstate address instead of solely using engine. Also sanitize your angles instead.
Quote Originally Posted by Epik View Post


I already told you to use the proper clientstate address instead of solely using engine. Also sanitize your angles instead.
Quote Originally Posted by ImStyL View Post
Im sorry for not being any help but...



When it should just be...

Code:
struct Vector {
	float x, y, z;
};

Vector ViewAngles = Mem.Read<Vector>(Engine + setView);

Also heres a an angle clamper epik was talking about, tbh this is everywhere so credit to whom ever made it.
Code:
Vector Memory::NormalizeAngles(Vector angle) 
{
	if (!std::isfinite(angle.x)) {
		angle.x = 0;
	}
	if (!std::isfinite(angle.y)) {
		angle.y = 0;
	}
	while (angle.y < -180.0f) angle.y += 360.0f;
	while (angle.y > 180.0f) angle.y -= 360.0f;
	if (angle.x > 89.0f) angle.x = 89.0f;
	if (angle.x < -89.0f) angle.x = -89.0f;
	angle.z = 0;
	return angle;
}
OK, this is what i think you both are talking about.... its still not working so im assuming that im doing something wrong because i am mucho confused.

Code:
#pragma once
#include "Offsets.h"
#include <math.h>
#include <iostream>
#include <string>
#include <ios>
#include <iomanip>

struct Vector {
	float x, y, z;
};

Vector vAimPunch;
Vector Fin;


Vector NormalizeAngles(Vector angle)
{
	if (!std::isfinite(angle.x)) {
		angle.x = 0;
	}
	if (!std::isfinite(angle.y)) {
		angle.y = 0;
	}
	while (angle.y < -180.0f) angle.y += 360.0f;
	while (angle.y > 180.0f) angle.y -= 360.0f;
	if (angle.x > 89.0f) angle.x = 89.0f;
	if (angle.x < -89.0f) angle.x = -89.0f;
	angle.z = 0;
	return angle;
}

void RCS()
{
	if (RCSEnabled)
	{
			DWORD Player = Mem.Read<DWORD>(Client + LocalPlayer);
			static Vector vOldPunchAngle;

			if (GetAsyncKeyState(VK_LBUTTON))
			{
				vAimPunch = Mem.Read<Vector>(Player + Punch);
				vAimPunch.x = vAimPunch.x * 2.f;
				vAimPunch.y = vAimPunch.y * 2.f;

				Vector ViewAngles = Mem.Read<Vector>(ClientState + ViewAngle);

				Fin.x = ViewAngles.x - (vAimPunch.x - vOldPunchAngle.x);
				Fin.y = ViewAngles.y - (vAimPunch.y - vOldPunchAngle.y);

				Mem.Write<Vector>(ClientState + ViewAngle, NormalizeAngles(Fin));

				vOldPunchAngle = vAimPunch;
			}
			else
			{
				vOldPunchAngle.x = 0;
				vOldPunchAngle.y = 0;
				Fin.x = 0;
				Fin.y = 0;
			}
	}
	
}
Im sorry for not being any help but...

Quote Originally Posted by ImWhacky
#include <vector>
using std::vector;

typedef struct {
float x, y, z;
}Vector;

Vector ViewAngles = Mem.Read<Vector>(Engine + setView);
When it should just be...

Code:
struct Vector {
	float x, y, z;
};

Vector ViewAngles = Mem.Read<Vector>(Engine + setView);

Also heres a an angle clamper epik was talking about, tbh this is everywhere so credit to whom ever made it.
Code:
Vector Memory::NormalizeAngles(Vector angle) 
{
	if (!std::isfinite(angle.x)) {
		angle.x = 0;
	}
	if (!std::isfinite(angle.y)) {
		angle.y = 0;
	}
	while (angle.y < -180.0f) angle.y += 360.0f;
	while (angle.y > 180.0f) angle.y -= 360.0f;
	if (angle.x > 89.0f) angle.x = 89.0f;
	if (angle.x < -89.0f) angle.x = -89.0f;
	angle.z = 0;
	return angle;
}
This is what Epik was saying,

Code:
Vector vAimPunch;
Vector Fin;

DWORD Player = Mem.Read<DWORD>(Client + LocalPlayer)
DWORD EngineBleh = Mem.Read<DWORD>(Engine + ClientState); //Engine is "Engine.dll"
Vector vOldPunchAngle;

if (GetAsyncKeyState(VK_LBUTTON))
{
	vAimPunch = Mem.Read<Vector>(Player + Punch);
	vAimPunch.x = vAimPunch.x * 2.f;
	vAimPunch.y = vAimPunch.y * 2.f;

	Vector ViewAngles = Mem.Read<Vector>(EngineBleh + ViewAngle);

	Fin.x = ViewAngles.x - (vAimPunch.x - vOldPunchAngle.x);
	Fin.y = ViewAngles.y - (vAimPunch.y - vOldPunchAngle.y);

	NormalizeAngles(Fin);
	Mem.Write<Vector>(EngineBleh + ViewAngle, Fin);
	vOldPunchAngle = vAimPunch;
}
else
{
	vOldPunchAngle.x = 0;
	vOldPunchAngle.y = 0;
	Fin.x = 0;
	Fin.y = 0;
}
ALSO THIS IS MY 69 POST, AYYLMAO
Quote Originally Posted by ImStyL View Post
This is what Epik was saying,
It should work, as i already tested it.

Code:
Vector vAimPunch;
Vector Fin;

DWORD Player = Mem.Read<DWORD>(Client + LocalPlayer)
DWORD EngineBleh = Mem.Read<DWORD>(Engine + ClientState); //Engine is "Engine.dll"
Vector vOldPunchAngle;

if (GetAsyncKeyState(VK_LBUTTON))
{
	vAimPunch = Mem.Read<Vector>(Player + Punch);
	vAimPunch.x = vAimPunch.x * 2.f;
	vAimPunch.y = vAimPunch.y * 2.f;

	Vector ViewAngles = Mem.Read<Vector>(EngineBleh + ViewAngle);

	Fin.x = ViewAngles.x - (vAimPunch.x - vOldPunchAngle.x);
	Fin.y = ViewAngles.y - (vAimPunch.y - vOldPunchAngle.y);

	NormalizeAngles(Fin);
	Mem.Write<Vector>(EngineBleh + ViewAngle, Fin);
	vOldPunchAngle = vAimPunch;
}
else
{
	vOldPunchAngle.x = 0;
	vOldPunchAngle.y = 0;
	Fin.x = 0;
	Fin.y = 0;
}
ALSO THIS IS MY 69 POST, AYYLMAO
Lol i put that in to test it and this is what happened
Posts 1–15 of 47 · Page 1 of 4
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?