• 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
  • Results 1 to 7 of 7
    1. #1
      Jr.Coder
      @_/ miiiaaauuuu
       
      Coding
       
      x86asm's Avatar
      Join Date
      Jan 2013
      Posts
      54
      Thanks (-->)
      3
      Thanks (<--)
      2

      CSGO Memory structure

      Silent VPN
      Hello, how can I know which value is x y and z?


      Click image for larger version. 

Name:	87d64gwmog3.png 
Views:	18 
Size:	55.5 KB 
ID:	2255



      I have reduced my code alot so that it is easier to see what i want to do.
      I have decided me to write at first a little program which aims only on the enemy but my bot aims on everything but not on my enemy ...
      I have read the player position and my own position with cheat engine. I there a problem with my x y z stuff?

      My player pos x?y?z? = HP address - 0x48
      Enemy player pos x?y?z? = Enemy HP address - 0x48

      Would be nice if someone could give me a hint.



      #include "stdafx.h"
      int _tmain(int argc, _TCHAR* argv[])
      {
      // x?y?z?
      float myPos[3] = {-1463.627441 , 64.03124237, 112.3842621 };
      float ePos[3] = {102.125, -970.25, 20 };
      float angles[3];
      CalcAngle( myPos, ePos, angles );

      cout<<angles[0]<<"\n";
      cout<<angles[1]<<"\n";
      cout<<angles[2]<<"\n";


      unsigned addr = GetDllBaseAddress( ProcessId, ProcessName, "engine.dll" );
      addr = addr + 0x4ca9b8;

      // get the first pointer
      ReadProcessMemory( ProcessHandle, reinterpret_cast<void*>(addr), &addr, sizeof(float), 0);

      // calculate values to get the right view_angle address
      addr = addr + 0x8 + 0x4c80;
      // aim on enemy
      WriteProcessMemory( ProcessHandle, reinterpret_cast<void*>(addr), &angles[0], 12, 0);



      system("PAUSE");

      return 0;
      }

      void CalcAngle( float *src, float *dst, float *angles )
      {
      double delta[3] = { (src[0]-dst[0]), (src[1]-dst[1]), (src[2]-dst[2]) };
      double hyp = sqrt(delta[0]*delta[0] + delta[1]*delta[1]);
      angles[0] = (float) (asinf(delta[2]/hyp) * 57.295779513082f);
      angles[1] = (float) (atanf(delta[1]/delta[0]) * 57.295779513082f);
      angles[2] = 0.0f;
      if(delta[0] >= 0.0) { angles[1] += 180.0f; }
      }

    2. #2
      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

      float myPos[3] = {-1463.627441 , 64.03124237, 112.3842621 };
      float ePos[3] = {102.125, -970.25, 20 };


      How can you even confirm it is working all right? How do you know you aren't aiming at that position?
      Last edited by c5; 12-09-2013 at 01:54 PM.
      CSGO Memory structure

    3. #3
      Jr.Coder
      @_/ miiiaaauuuu
       
      Coding
       
      x86asm's Avatar
      Join Date
      Jan 2013
      Posts
      54
      Thanks (-->)
      3
      Thanks (<--)
      2
      If I run around then I can see that these values are chaning. And if i look around with my mouse then I can see that these values are not changing.
      So I think that these values are correct.

    4. #4
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      145
      Hello, how can I know which value is x y and z?
      Well, if you jump z should increase

      CSGO Memory structure

      Are you 100% sure you are reading the right addresses?

    5. #5
      Jr.Coder
      @_/ miiiaaauuuu
       
      Coding
       
      x86asm's Avatar
      Join Date
      Jan 2013
      Posts
      54
      Thanks (-->)
      3
      Thanks (<--)
      2
      If I typ in csgo console: setpos 90 90 90

      Then is my position:
      ad8d9d8 = 90
      AD8D9DC = 90
      AD8D9E0 = 0.03125 <-- Thats looks strange o_O

      I guess I should get 90 three times ... ( ad8d9d8 - 4 also not = 90 )


      Oh, I guess I have it it was just a x y problem. Now it should work.

      Thx alot guys. If I just think that it works then I will come back. ^_^
      But at first I must clean up my code its sooooooo messy.
      Last edited by x86asm; 12-09-2013 at 03:04 PM.

    6. #6
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      145
      Quote Originally Posted by x86asm View Post
      If I typ in csgo console: setpos 90 90 90

      Then is my position:
      ad8d9d8 = 90
      AD8D9DC = 90
      AD8D9E0 = 0.03125 <-- Thats looks strange o_O

      I guess I should get 90 three times ... ( ad8d9d8 - 4 also not = 90 )


      Oh, I guess I have it it was just a x y problem. Now it should work.

      Thx alot guys. If I just think that it works then I will come back. ^_^
      But at first I must clean up my code its sooooooo messy.
      The CalcAngle looks good so don't worry about that (before you start messing with it ).

    7. #7
      Jr.Coder
      @_/ miiiaaauuuu
       
      Coding
       
      x86asm's Avatar
      Join Date
      Jan 2013
      Posts
      54
      Thanks (-->)
      3
      Thanks (<--)
      2
      Silent VPN
      Yeah, it works already nice against one enemy.^^
      Now I work on the distance stuff. But my code was so amazing horrible messy ... I was scrolling through my code and just started to laugh. xD xD
      So I have decide to write a clean code from 0. (Ok, nearly zero I have still my old code and can take single functions and stuff from it.)
      Last edited by x86asm; 12-11-2013 at 05:21 PM.

    Similar Game Hacker Threads

    1. CSGO: Reading the weapon structure.
      By Obsta in forum C/C++
      Replies: 2
      Last Post: 08-10-2016, 01:36 PM
    2. [BF3] help structure weapons
      By docc in forum Hacking Help
      Replies: 4
      Last Post: 07-11-2015, 06:11 PM
    3. Replies: 8
      Last Post: 02-03-2015, 02:42 AM
    4. Replies: 7
      Last Post: 07-27-2014, 04:49 AM
    5. help, structure undefined
      By NTvalk in forum C/C++
      Replies: 2
      Last Post: 10-28-2013, 10:00 AM

    Tags for this Thread