Results 1 to 6 of 6
  1. #1
    laurrence97's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Location
    Somewhere
    Posts
    9
    Reputation
    10
    Thanks
    1

    simple rcs hack with updated offsets doesnt work?

     
    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.
    Last edited by laurrence97; 04-10-2017 at 06:01 AM.

  2. #2
    certmemer's Avatar
    Join Date
    Feb 2016
    Gender
    female
    Location
    Southampton
    Posts
    2,511
    Reputation
    104
    Thanks
    25,994
    ""my code""

  3. #3
    laurrence97's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Location
    Somewhere
    Posts
    9
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by certmemer View Post
    ""my code""
    oh sorry lol. what i meant was, the code i was using .. my bad

  4. #4
    sagaantheepic4's Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    312
    Reputation
    10
    Thanks
    2,142
    My Mood
    Chatty
    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.
    Last edited by T-800; 04-15-2017 at 04:09 AM.

  5. #5
    laurrence97's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Location
    Somewhere
    Posts
    9
    Reputation
    10
    Thanks
    1
    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?

  6. #6
    laurrence97's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Location
    Somewhere
    Posts
    9
    Reputation
    10
    Thanks
    1
    sagaantheepic4,

    i got my rcs to a working state now.
    really big thanks to you!

  7. The Following User Says Thank You to laurrence97 For This Useful Post:

    sagaantheepic4 (04-18-2017)

Similar Threads

  1. [Help] Where do I start with coding a simple glow hack?
    By khm9 in forum Counter-Strike 2 Coding & Resources
    Replies: 8
    Last Post: 03-08-2016, 12:27 PM
  2. Soo.....the hacks with sxs.dll dont work no more? :3
    By WolfenXD in forum CrossFire Discussions
    Replies: 1
    Last Post: 12-15-2011, 07:06 AM
  3. [Release] Matypatty's Pub Hack (with updater) FIXED
    By matypatty in forum Combat Arms Hacks & Cheats
    Replies: 959
    Last Post: 04-08-2010, 06:44 PM
  4. [Release] Matypatty's Pub Hack (with updater)
    By matypatty in forum Combat Arms Hacks & Cheats
    Replies: 30
    Last Post: 02-28-2010, 10:35 PM
  5. Simple crossfire hack with out injectors and .dlls
    By ineverhack in forum CrossFire Hacks & Cheats
    Replies: 5
    Last Post: 08-17-2009, 12:14 PM