• 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
  • Sipping
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 6 of 6
    1. #1
      Administrator
      Hacked By Jesus
       
      Sipping
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      3,842
      Thanks (-->)
      961
      Thanks (<--)
      1155

      How To Loop Through Entity List Internally

      How to Call Game Functions
      If you just started with internals, you shouldn't be adding offsets manually for any common classes, you need to use ReClass like this. People have lots of trouble moving from external to internal, this is a super simple source code for looping through the entity list internally using the correct method. Using ReClass will make your life 10000000% better, then you just create pointers to objects in memory and typecast them to classes you've already defined using reclass. So easy!

      Internal + ReClass done correctly =


      #include <windows.h>
      #include <iostream>

      struct Vec3
      {
      float x, y, z;
      };

      class playerent;

      class weapon
      {
      public:
      char pad_0x0000[0x4]; //0x0000
      __int32 ID; //0x0004
      playerent * owner; //0x0008
      uintptr_t * guninfo; //0x000C
      int * ammo2; //0x0010
      int * ammo; //0x0014
      int * gunWait;
      int shots;
      int breload;
      };

      class playerent
      {
      public:
      DWORD vTable; //0x0
      Vec3 head; //0x0004
      char _0x0010[36];
      Vec3 pos; //0x0034
      Vec3 angle; //0x0040
      char _0x004C[37];
      BYTE bScoping; //0x0071
      char _0x0072[134];
      __int32 health; //0x00F8
      __int32 armor; //0x00FC
      char _0x0100[292];
      BYTE bAttacking; //0x0224
      char name[16]; //0x0225
      char _0x0235[247];
      BYTE team; //0x032C
      char _0x032D[11];
      BYTE state; //0x0338
      char _0x0339[59];
      weapon* weapon; //0x0374
      char _0x0378[520];
      };

      struct EntList
      {
      playerent * ents[31];
      };

      bool IsValidEnt(playerent* ent)
      {
      if (ent)
      {
      if (ent->vTable == 0x4E4A98 || ent->vTable == 0x4E4AC0)
      {
      return true;
      }
      }
      return false;
      }

      int * numOfPlayers = (int*)(0x50f500);
      playerent * localPlayer = *(playerent**)0x50F4F4;
      EntList * entList = *(EntList**)0x50F4F8;

      DWORD __stdcall Thread(void* pParam)
      {

      FILE *pFile = nullptr;
      AllocConsole();
      freopen_s(&pFile, "CONOUT$", "w", stdout);

      while (1)
      {
      for (int i = 0; i < (*numOfPlayers); i++)
      {
      if (IsValidEnt(entList->ents[i]))
      {
      std::cout << entList->ents[i]->name << std::endl;
      Sleep(100);
      }
      }
      }

      }

      BOOL __stdcall DllMain(HINSTANCE hDll, DWORD dwReason, void* pReserved)
      {
      if (dwReason == DLL_PROCESS_ATTACH)
      {
      CreateThread(nullptr, 0, Thread, nullptr, 0, nullptr);
      }
      return TRUE;
      }


      How To Loop Through Entity List Internally

    2. Thanks Lukor thanked for this post
    3. #2
      Coder
      explode strings
       
      Lagging
       
      Lukor's Avatar
      Join Date
      Dec 2013
      Posts
      171
      Thanks (-->)
      36
      Thanks (<--)
      33
      You probably wanted to place the sleep (slower) in the while loop instead of the for loop right? Its quite slow this way.
      Otherwise this is clean code. Everyone starting to work on AC should do it just like Rake did here!
      I'm a simple man. I see a good post, i press "Thank for this post".

    4. #3
      I has a status
      I rage frequently
       
      Pawning
       
      PwndDepot's Avatar
      Join Date
      Nov 2014
      Location
      Colorado
      Posts
      190
      Thanks (-->)
      69
      Thanks (<--)
      35
      I usually keep the playerent and entity list array the same data types, that's a neat simple trick doing:


      struct EntList
      {
      playerent * ents[31];
      };

      I'm going to do that next internal hack I write!

    5. #4
      Newbie
      k
       
      Feeling Normal
       
      ApplePi19's Avatar
      Join Date
      Mar 2017
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0
      why dereference the pointer in the loop instead of

      int numOfPlayers = *(int*)(0x50f500);

    6. #5
      Coder
      explode strings
       
      Lagging
       
      Lukor's Avatar
      Join Date
      Dec 2013
      Posts
      171
      Thanks (-->)
      36
      Thanks (<--)
      33
      This way he copes with the sleep within the for loop... If a player were to leave the for loop could walk a player not in memory anymore.
      Like this the for loop checks the current playercount every iteration instead of the same value
      I'm a simple man. I see a good post, i press "Thank for this post".

    7. #6
      Newbie
      k
       
      Feeling Normal
       
      ApplePi19's Avatar
      Join Date
      Mar 2017
      Posts
      2
      Thanks (-->)
      0
      Thanks (<--)
      0
      Advertise on GuidedHacking
      yeah, thought about it after i posted, thx

    Similar Game Hacker Threads

    1. [Help] AC Entity List
      By PwndDepot in forum Hacking Help
      Replies: 1
      Last Post: 11-22-2016, 07:30 PM
    2. [Help] Entity list information?
      By Oneshot in forum CS:GO Hacks
      Replies: 7
      Last Post: 11-02-2016, 04:32 AM
    3. [Help] I have made a Aimbot. now i need to loop thru the entity list
      By Oneshot in forum CS:GO Hacks
      Replies: 16
      Last Post: 10-09-2016, 03:38 PM
    4. [Help] Entity List
      By r4z0r in forum Hacking Help
      Replies: 5
      Last Post: 08-10-2016, 07:01 PM
    5. [Help] Entity list
      By TrojanPoem in forum Hacking Help
      Replies: 10
      Last Post: 07-26-2015, 10:09 AM