Solved SetViewAngles Problem [CS:GO]

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

LOLKFC

Newbie
Full Member
Oct 23, 2014
17
318
0
Hey guys ! Already uset the search function but i didnt find a solution for my problem.
I want to set my viewangles for an aimbot. I tried to set the Boneposition of the enemies ( normal aimbot with calcang ) and to write random values. My crosshair is chilling in the same place like before :/

My func for SetAngle
C++:
void LocalPlayerP::SetAngles(float* Angles)
{
	DWORD AnglePointer;
	memmove(&AnglePointer, (DWORD*)(DwEngine + DwEnginePointer), sizeof(DWORD));
	if (AnglePointer)
	{
		memmove((float*)(AnglePointer + DwViewAngles), Angles, sizeof(float)* 3);
	}
}
Is anything wrong here?
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371
You could do something like this.

C++:
void setViewAngles(Vec3& vNewAngles) {

    DWORD dwEngine = 0x04000000; // Fake, replace with real?
    DWORD DwEnginePointer = 0x00603745; // Fake, replace with real?

    Vec3 *myAngles = (Vec3*)(dwEngine + DwEnginePointer);

    myAngles->x = vNewAngles.x;
    myAngles->y = vNewAngles.y;
    myAngles->z = 0.0f;
}

// ---
// You can also calculate your new angles first, then add them. Just change the function. Possibilities are endless. :)
Vec3 MyAngles = { 300, 300, 0};
setViewAngles(MyAngles);
 
Last edited by a moderator:

LOLKFC

Newbie
Full Member
Oct 23, 2014
17
318
0
Thanks for your answer. It should be the right one.
I multiply it with 3 because the Array of 3 :/ ( x y z )

(im new at coding)
 

Dohax

Newbie
Full Member
Apr 21, 2015
15
128
0
Thanks for your answer. It should be the right one.
I multiply it with 3 because the Array of 3 :/ ( x y z )

(im new at coding)
Are the angles saved in a vector, or is it three different addresses (one for each x y z)?
I think this might be your problem.
 

LOLKFC

Newbie
Full Member
Oct 23, 2014
17
318
0
Theyre get saved like this:
C++:
float AimAngles[3];
( x y z )
I dont know how i can explain it in english, my english isnt goot :/
but thanks !
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371
Here is a Vec3 class I wrote myself. Feel free to use it to replace the float[3]. :)

C++:
#ifndef _ODYSSEY_VEC3D__H
#define _ODYSSEY_VEC3D__H

#include <Windows.h>
#include <math.h>

class Vec3 {
public:
    float x, y, z;

    Vec3() { x = y = z = 0; }
    Vec3(float Px, float Py, float Pz) {
        x = Px;
        y = Py;
        z = Pz;
    }

    Vec3 operator+ (const Vec3 &T) const {
        return Vec3( x + T.x, y + T.y, z + T.z );
    }
    Vec3 operator- (const Vec3 &T) const {
        return Vec3( x - T.x, y - T.y, z - T.z );
    }
    Vec3 operator* (const Vec3 &T) const {
        return Vec3( x * T.x, y * T.y, z * T.z );
    }

    void Normalize(void) {
        if (float magnitude = Length() != 0) {
            x /= magnitude;
            y /= magnitude;
            z /= magnitude;
        }
    }
    float Length(void) {
        return sqrtf ( ( x * x ) + ( y * y ) + ( z * z ) );
    }


    float Distance(const Vec3 &T) const {
        return Vec3(x - T.x, y - T.y, z - T.z).Length();
    }
    float DotProduct(const Vec3 &T) const {
        return ( ( x * T.x ) + ( y * T.y ) + ( z * T.z ) );
    }
};

#endif
Sure it might be missing a few things, but I haven't got around them yet.

Good luck!
 

LOLKFC

Newbie
Full Member
Oct 23, 2014
17
318
0
Here is a Vec3 class I wrote myself. Feel free to use it to replace the float[3]. :)

C++:
#ifndef _ODYSSEY_VEC3D__H
#define _ODYSSEY_VEC3D__H

#include <Windows.h>
#include <math.h>

class Vec3 {
public:
    float x, y, z;

    Vec3() { x = y = z = 0; }
    Vec3(float Px, float Py, float Pz) {
        x = Px;
        y = Py;
        z = Pz;
    }

    Vec3 operator+ (const Vec3 &T) const {
        return Vec3( x + T.x, y + T.y, z + T.z );
    }
    Vec3 operator- (const Vec3 &T) const {
        return Vec3( x - T.x, y - T.y, z - T.z );
    }
    Vec3 operator* (const Vec3 &T) const {
        return Vec3( x * T.x, y * T.y, z * T.z );
    }

    void Normalize(void) {
        if (float magnitude = Length() != 0) {
            x /= magnitude;
            y /= magnitude;
            z /= magnitude;
        }
    }
    float Length(void) {
        return sqrtf ( ( x * x ) + ( y * y ) + ( z * z ) );
    }


    float Distance(const Vec3 &T) const {
        return Vec3(x - T.x, y - T.y, z - T.z).Length();
    }
    float DotProduct(const Vec3 &T) const {
        return ( ( x * T.x ) + ( y * T.y ) + ( z * T.z ) );
    }
};

#endif
Sure it might be missing a few things, but I haven't got around them yet.

Good luck!

Thank you very much for the class !


But where is the problem for my viewangles? The issue is, i cant write to them :/ I tried random values already but my chrosshair is still in the same place :/
Anything shout be wrong at my SetViewAngle function .. but i dont know what :(
 

LOLKFC

Newbie
Full Member
Oct 23, 2014
17
318
0
You could do something like this.

C++:
void setViewAngles(Vec3& vNewAngles) {

    DWORD dwEngine = 0x04000000; // Fake, replace with real?
    DWORD DwEnginePointer = 0x00603745; // Fake, replace with real?

    Vec3 *myAngles = (Vec3*)(dwEngine + DwEnginePointer);

    myAngles->x = vNewAngles.x;
    myAngles->y = vNewAngles.y;
    myAngles->z = vNewAngles.z;
}

// ---
// You can also calculate your new angles first, then add them. Just change the function. Possibilities are endless. :)
Vec3 MyAngles = { 300, 300, 300 };
setViewAngles(MyAngles);
Thanks for the answer again but i think im too stupid to use this :/
I pasted the function from you and i called it in my aimbot thread:
C++:
			Vec3 MyAngles = { 300, 300, 300 };
	
			setViewAngles(MyAngles);
You mean with DwEngine a Adress or the Adress of the Module ? ( engine.dll )

for what is SetViewAngles then ? (i mean the offset) Do i need this here?

Sry for my stupidness, its my first aimbot
 

galaxykiller

Newbie
Feb 7, 2014
2
102
1
Let's take your function for example.

C++:
void LocalPlayerP::SetAngles(float* Angles)
{
    DWORD AnglePointer;
    memmove(&AnglePointer, (DWORD*)(DwEngine + DwEnginePointer), sizeof(DWORD));
    if (AnglePointer)
    {
        memmove((float*)(AnglePointer + DwViewAngles), Angles, sizeof(float)* 3);
    }
}
And now I am going to grab mine.
C++:
void setViewAngles(Vec3& vNewAngles) {
 
    DWORD dwEngine = 0x04000000; // Fake, replace with yours.
    DWORD DwEnginePointer = 0x00603745; // Fake, replace with yours.
 
    Vec3 *myAngles = (Vec3*)(dwEngine + DwEnginePointer); // Not tested, you can test whether it'll work or not.
 
    myAngles->x = vNewAngles.x;
    myAngles->y = vNewAngles.y;
    myAngles->z = 0.0f;
}
The purpose of the function is the same but the code is slightly different.
C++:
DWORD dwEngine = 0x04000000; // Base of engine.dll (Could also do (DWORD)GetModuleHandle("engine.dll");
DWORD DwEnginePointer = 0x00603745; // Address of whatever it is pointing too. It's bogus, fake. I used fake details, you need to replace them with yours.

// You don't have to have them in the function, you can also declare them in your class somewhere. :)
Here is the same function just slightly different again.
C++:
void setViewAngles2(float viewX, float viewY) {

    DWORD dwEngine = 0x04000000; // Fake, replace with yours.
    DWORD DwEnginePointer = 0x00603745; // Fake, replace with yours.

    Vec3 *myAngles = (Vec3*)(dwEngine + DwEnginePointer); // Not tested, you can test whether it'll work or not.

    myAngles->x = viewX;
    myAngles->y = viewY;
    myAngles->z = 0.0f;
}
You can then proceed and call the function like:
C++:
Vec3 MyAngles = { 300, 300, 0 };
setViewAngles(MyAngles);

// ---

setViewAngles2(1337.0f, 1337.0f);
Unfortunately, I suck at explaining things and this is the best I can do. I hope you understand it. :)

Good luck!
 

LOLKFC

Newbie
Full Member
Oct 23, 2014
17
318
0
Thank you for your big help, i tried it, but i dont get it working :/ I tried many variantes but noone of them works :(
(Of course i replaced the Offsets)

but your class is very useful, thanks alot !
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371
Are you entirely sure the ViewAngles you got are not read-only? :)
 

LOLKFC

Newbie
Full Member
Oct 23, 2014
17
318
0
Yes, i tried self reversed offsets from Olly ( string SetViewAngles ) and some from Dumper :(
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods