• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 16
    1. #1
      Hacker
      shell toes yes
       
      Lagging
       
      squeenie's Avatar
      Join Date
      Mar 2013
      Posts
      717
      Thanks (-->)
      599
      Thanks (<--)
      221

      [Tutorial] Messing around with the source engine + SDK

      John Kittz
      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.

      Click image for larger version. 

Name:	pic1.png 
Views:	228 
Size:	83.5 KB 
ID:	2499

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

      Click image for larger version. 

Name:	pic2.png 
Views:	129 
Size:	70.4 KB 
ID:	2500

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

      Click image for larger version. 

Name:	pic3.jpg 
Views:	142 
Size:	108.9 KB 
ID:	2501

      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.

      Click image for larger version. 

Name:	pic4.jpg 
Views:	228 
Size:	101.3 KB 
ID:	2502

      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:
      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:

      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, UnknownCheats, tamimego

      Here is my header file for QAngles, slightly modified from the SDK (basically just commented out junk)
      #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 by squeenie; 02-25-2014 at 03:29 AM.

    2. #2
      Hacker
      shell toes yes
       
      Lagging
       
      squeenie's Avatar
      Join Date
      Mar 2013
      Posts
      717
      Thanks (-->)
      599
      Thanks (<--)
      221
      Comments and feedback are appreciated
      Questions are also welcome.
      Last edited by squeenie; 02-24-2014 at 08:56 PM.

    3. #3
      Jr.Coder
      <3 D3D
       
      Coding
       
      gnuzim's Avatar
      Join Date
      Nov 2012
      Posts
      67
      Thanks (-->)
      43
      Thanks (<--)
      27
      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

    4. #4
      Hacker
      shell toes yes
       
      Lagging
       
      squeenie's Avatar
      Join Date
      Mar 2013
      Posts
      717
      Thanks (-->)
      599
      Thanks (<--)
      221
      Quote Originally Posted by gnuzim View Post
      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

    5. #5
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      Quote Originally Posted by gnuzim View Post
      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
      [Tutorial] Messing around with the source engine + SDK

    6. Thanks squeenie thanked for this post
    7. #6
      Hacker
      shell toes yes
       
      Lagging
       
      squeenie's Avatar
      Join Date
      Mar 2013
      Posts
      717
      Thanks (-->)
      599
      Thanks (<--)
      221
      Quote Originally Posted by c5 View Post
      Just use the SDK as a reference
      This. If you compile the sdk you just end up with another useless client.dll

    8. #7
      Hacker
      Working, University, Coding ..
       
      Drinking
       
      GAFO666's Avatar
      Join Date
      Aug 2012
      Location
      if(PlayerBase << 16) return IdontKnow("yolo");
      Posts
      531
      Thanks (-->)
      33
      Thanks (<--)
      102
      Quote Originally Posted by squeenie View Post
      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

      Leave a rep+ if I helped you with my answer
      Dont tell me to google something, first thing I do before asking is searching on my own.

    9. #8
      Hacker
      shell toes yes
       
      Lagging
       
      squeenie's Avatar
      Join Date
      Mar 2013
      Posts
      717
      Thanks (-->)
      599
      Thanks (<--)
      221
      Quote Originally Posted by GAFO666 View Post
      lol. you are a rly funny guy. why the hell you wanna compile the sdk
      No one wants to compile the SDK

    10. #9
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      492
      Quote Originally Posted by GAFO666 View Post
      lol. you are a rly funny guy. why the hell you wanna compile the sdk, thats crappy bullsh!t.
      and you are the guy who can't read
      [Tutorial] Messing around with the source engine + SDK

    11. Thanks Crazywink thanked for this post
    12. #10
      Hacker
      Working, University, Coding ..
       
      Drinking
       
      GAFO666's Avatar
      Join Date
      Aug 2012
      Location
      if(PlayerBase << 16) return IdontKnow("yolo");
      Posts
      531
      Thanks (-->)
      33
      Thanks (<--)
      102
      Cheats'n'Trainers
      na Im just drunk as always ^^ at least I know howto do it right xD

      Leave a rep+ if I helped you with my answer
      Dont tell me to google something, first thing I do before asking is searching on my own.

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. [Help] Introduction to source engine
      By Dretch in forum Hacking Help
      Replies: 2
      Last Post: 01-24-2016, 03:41 PM
    2. [Source Code] Simple Bunny Hop Using Source Engine Functions [CS:Source]
      By Simon-Benyo in forum Tutorials and Snippets
      Replies: 7
      Last Post: 10-11-2015, 01:18 PM
    3. [Help] Source engine Entity
      By DarkArlene in forum Hacking Help
      Replies: 7
      Last Post: 03-23-2015, 01:40 PM
    4. [Help] Ray tracing (source engine)
      By Liduen in forum Source Engine Hacks
      Replies: 32
      Last Post: 08-22-2014, 10:48 AM

    Tags for this Thread