Outdated [Tutorial] Messing around with the source engine + SDK

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
Greetings and welcome to my source engine/SDK tutorial. First things first, open up css (or any other source game) and attach ollydbg to it. Hit play a couple of times until olly says css is running.

pic1.png

Open up the module list and have a looksee in client.dll.

pic2.png

Search for all referenced text strings and sift through the results until you find VEngineClient014

pic3.jpg

Now look down a couple of lines and you will see a pointer being passed from EAX. You’ll notice this changes every time you restart css/dods/tf2/l4d etc.

pic4.jpg

So what do we do? We could modify fleeps pattern finding function to look for a string instead but for simplicities sake lets take the easy way out. Open up the executable modules list again and have a look at the base for client.dll. Now open up calculator and switch to programmers mode. Take the pointer address and minus the client.dll base address from it. This is your pointer offset for VEngineClient.
Now we’ll take a look at the source SDK. You can download it from the valve github (or searching the forum).

Open up the project and wait for it to load (can take a while, its pretty damn big). Once it has loaded search for “VEngineClient14” (or simply open cdll_int.h).
You’ll land in a header file which shows us exactly how it is set up. From here you can take a look at all the functions and figure out which ones you want to use. SetViewAngles is a nice function to use so lets take a look at that. If you count all the virtual functions you’ll find it at index 20.

From here we go back to our project and create a new header file. Called it “EngineFunctions.h” or whatever you want. Create a new class called “VEngineClient”. Now we are going to pad the function. Add 19 blank virtual functions to line it up properly, like so:
C++:
virtual void Function001();
virtual void Function002();
virtual void Function002();
virtual void Function003();
……………………………………………
virtual void Function019();
virtual void SetViewAngles( QAngle& va );
Now in your initialization code set the new class pointer to client.dll base + offset and boom away you go.

You can call your functions like so:

C++:
VEngineClient->SetViewAngles(MyAngles);
There are a shitload of other useful functions like IsConsoleOpen and IsClientConnected etc.

Feel free to post this elsewhere, link to it, whatever.

Love from Squeenie <3

Credits: Fleep, brinkz, unkn0wncheats, tamimego

Here is my header file for QAngles, slightly modified from the SDK (basically just commented out junk)
C++:
#pragma once
typedef float vec_t;

class QAngle					
{
public:
	// Members
	vec_t x, y, z;

	// Construction/destruction
	//QAngle();
	//QAngle(vec_t X, vec_t Y, vec_t Z);
//	QAngle(RadianEuler const &angles);	// evil auto type promotion!!!

	// Allow pass-by-value
	//operator QAngleByValue&()				{ return *((QAngleByValue *)(this)); }
	//operator const QAngleByValue &() const	{ return *((const QAngleByValue *)(this)); }

	// Initialization
	void Init(vec_t ix=0.0f, vec_t iy=0.0f, vec_t iz=0.0f);
	void Random( vec_t minVal, vec_t maxVal );

	// Got any nasty NAN's?
	bool IsValid() const;
	void Invalidate();

	// array access...
	vec_t operator[](int i) const;
	vec_t& operator[](int i);

	// Base address...
	vec_t* Base();
	vec_t const* Base() const;
	
	// equality
	bool operator==(const QAngle& v) const;
	bool operator!=(const QAngle& v) const;	

	// arithmetic operations
	QAngle&	operator+=(const QAngle &v);
	QAngle&	operator-=(const QAngle &v);
	QAngle&	operator*=(float s);
	QAngle&	operator/=(float s);

	// Get the vector's magnitude.
	vec_t	Length() const;
	vec_t	LengthSqr() const;

	// negate the QAngle components
	//void	Negate(); 

	// No assignment operators either...
	QAngle& operator=( const QAngle& src )
	{
		x = src.x;
		y = src.y;
		z = src.z;
		return *this;
	}

#ifndef VECTOR_NO_SLOW_OPERATIONS
	// copy constructors

	// arithmetic operations
	QAngle	operator-(void) const;
	
	QAngle	operator+(const QAngle& v) const;
	QAngle	operator-(const QAngle& v) const;
	QAngle	operator*(float fl) const;
	QAngle	operator/(float fl) const;
#else

private:
	// No copy constructors allowed if we're in optimal mode
	QAngle(const QAngle& vOther);

#endif
};
Might add theres other cool classes you can use like EngineTrace and DebugOverlay. Just use the same steps outlined above.
 
Last edited:

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
Comments and feedback are appreciated :)
Questions are also welcome.
 
Last edited:

gnuzim

Jr.Coder
Trump Tier Donator
Dank Tier Donator
Nobleman
Nov 28, 2012
67
1,418
0
nice tutorial, i thought your tutorial was a little more basic, like setting SDK header files, i'm not saying that this won't help, it will, because GAFO666 has helped me setting up the Source SDK, but i think if you make a small tutorial explaining that too would help alot people around here, if its not too much work, of course!

Unless i'm the only noob that can't setup an Engine SDK, this is possible! :p

But anyway, i'm trying your tutorial right now, doing pretty good so far!
Thanks +rep
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
nice tutorial, i thought your tutorial was a little more basic, like setting SDK header files, i'm not saying that this won't help, it will, because GAFO666 has helped me setting up the Source SDK, but i think if you make a small tutorial explaining that too would help alot people around here, if its not too much work, of course!

Unless i'm the only noob that can't setup an Engine SDK, this is possible! :p

But anyway, i'm trying your tutorial right now, doing pretty good so far!
Thanks +rep
I'm not exactly sure what you mean by "setting up the SDK". You just open the project file in the zip named "everything" and it loads up the whole project ready to be compiled. There are a lot of things that could be added to this tutorial like not wasting space by padding functions etc but I thought I'd keep it simple. PM me with exactly what you want and I'll see what I can do. Might take a while though because I still don't have fixed internet and I'm still setting up my new house :( (which is why it took me so long to post this).

But thanks for the feedback :)
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
nice tutorial, i thought your tutorial was a little more basic, like setting SDK header files, i'm not saying that this won't help, it will, because GAFO666 has helped me setting up the Source SDK, but i think if you make a small tutorial explaining that too would help alot people around here, if its not too much work, of course!

Unless i'm the only noob that can't setup an Engine SDK, this is possible! :p

But anyway, i'm trying your tutorial right now, doing pretty good so far!
Thanks +rep
Just use the SDK as a reference
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
This. If you compile the sdk you just end up with another useless client.dll
lol. you are a rly funny guy. why the hell you wanna compile the sdk, thats crappy bullsh!t.
you need to include only parts of the sdk, eg in CSS its the
-common
-game
-lib
-materialsystem
-public

..folder and then you reference it inside of your project.

and thats how it can look like then
https://www.youtube.com/watch?v=ad5OagEXDRM&hd=1
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
na Im just drunk as always ^^ at least I know howto do it right xD
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
hmm idk if its the right thing to post sources over sources, but if you have a question, you could pm me. I will help but I wont just give ppl c/p stuff hmm
Sauce = Alcohol.
Source = code.

So once again, lay off the sauce.
 

Dretch

Newbie
Full Member
Sep 17, 2015
26
229
2
I am sorry to bump this thread but has anything changed regarding this tutorial? Because I got unhandled exception: read access violation on 0xCA05F4, which should be the offset for VEngineClient. I am trying to load the dll into TF2 on Windows 7, 32bit and I'm trying to SetViewAngles to 0, 0, 0, just to try this tutorial out.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,305
37,938
270
Nah source engine rarely changes.
Indices may have changed due to some updates though, or you're doing something incorrectly.
 
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