• 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
      Hi There!
       
      Coding
       
      FloppyWhale's Avatar
      Join Date
      Jan 2015
      Posts
      65
      Thanks (-->)
      24
      Thanks (<--)
      11

      Counting Players

      Advertise on GuidedHacking
      Hi guys! I've been trying to make something to where it checks how many names are in the pointer address for the player array. I'm quite stuck actually all I have so far results in the game crashing.

      Here's my function for getting the players: (The 32 is the max amount of players, I think, are able to play at once).

      void GetPlayers() {
      for each(char string in pEnts->Ents[32]->Name) {
      initialPlayers++;
      }
      }


      Here's the entity class along with the pointer address for it: (Thanks to Rake for entity & player address pointer help).

      class entities {
      public:
      myPlayer * Ents[32]; //There are 32 max players.
      };

      entities * pEnts = (entities*)*(DWORD*)(0x50F4F8);


      Any help/suggestions is greatly appreciated!

    2. #2
      I has a status
      I rage frequently
       
      Pawning
       
      PwndDepot's Avatar
      Join Date
      Nov 2014
      Location
      Colorado
      Posts
      182
      Thanks (-->)
      69
      Thanks (<--)
      34
      I'm not sure how assault cube stores player names, but maybe do a check in your loop to see if it's a valid name?

      if (Name != NULL)
      initialPlayers++;


      just an idea

    3. Thanks FloppyWhale thanked for this post
    4. #3
      Jr.Coder
      Hi There!
       
      Coding
       
      FloppyWhale's Avatar
      Join Date
      Jan 2015
      Posts
      65
      Thanks (-->)
      24
      Thanks (<--)
      11
      Quote Originally Posted by PwndDepot View Post
      I'm not sure how assault cube stores player names, but maybe do a check in your loop to see if it's a valid name?

      if (Name != NULL)
      initialPlayers++;


      just an idea
      Alrighty will do!

    5. #4
      Administrator
      Hacked By Jesus
       
      Reversing
       
      [GH]Rake's Avatar
      Join Date
      Jan 2014
      Location
      USA
      Posts
      3,609
      Thanks (-->)
      866
      Thanks (<--)
      1064
      Quote Originally Posted by FloppyWhale View Post
      [CPP]
      void GetPlayers() {
      for each(char string in pEnts->Ents[32]->Name) {
      initialPlayers++;
      }
      }
      !
      That will not work. Also trying to read a member variable from an invalid pointer will cause an Access Violation


      Here's what I do, notice there is a numOfPlayers address


      class playerent_t
      {
      public:
      DWORD vTable; //0x0
      vec3_t head; //0x0004
      char _0x0010[36];
      vec3_t pos; //0x0034
      vec3_t 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_t
      {
      playerent_t * ents[31];
      };


      int * numOfPlayers = (int*)(0x50f500);
      entList_t * entList = *(entList_t**)0x50F4F8;

      //ReadPlayerData function does this:

      for (int i = 0; i < (*numOfPlayers); i++)
      {
      auto e = entList->ents[i];
      if (!e || !e->vTable) continue;
      if (e->vTable == 0x4E4A98 || e->vTable == 0x4E4AC0)
      {
      Aimbot->players.push_back(AC_PlayerClass_t(e)));
      }
      }

    6. #5
      Jr.Coder
      Hi There!
       
      Coding
       
      FloppyWhale's Avatar
      Join Date
      Jan 2015
      Posts
      65
      Thanks (-->)
      24
      Thanks (<--)
      11
      Quote Originally Posted by [GH]Rake View Post
      That will not work. Also trying to read a member variable from an invalid pointer will cause an Access Violation


      Here's what I do, notice there is a numOfPlayers address


      class playerent_t
      {
      public:
      DWORD vTable; //0x0
      vec3_t head; //0x0004
      char _0x0010[36];
      vec3_t pos; //0x0034
      vec3_t 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_t
      {
      playerent_t * ents[31];
      };


      int * numOfPlayers = (int*)(0x50f500);
      entList_t * entList = *(entList_t**)0x50F4F8;

      //ReadPlayerData function does this:

      for (int i = 0; i < (*numOfPlayers); i++)
      {
      auto e = entList->ents[i];
      if (!e || !e->vTable) continue;
      if (e->vTable == 0x4E4A98 || e->vTable == 0x4E4AC0)
      {
      Aimbot->players.push_back(AC_PlayerClass_t(e)));
      }
      }
      Would this work?

      for (int i = 0; i < *players; i++) {
      if (pEnt->Ents[i]->vTable == (DWORD*)(0x4E4A98))
      //Do something here
      }


      Reason why I had changed it was because I was getting an error about DWORD not being compatible with int, and I couldn't find the error.
      I also have it defined like you :
      int* players = (int*)(0x50F50);

      So I have no clue why it was giving me that error.

    7. #6
      Newbie
      Learning to hack games!
       
      Coding
       
      Amonomen's Avatar
      Join Date
      May 2016
      Posts
      20
      Thanks (-->)
      5
      Thanks (<--)
      2
      There is an address in my version that seems to contain an integer of how many players are in the game.

      Oddly, it it zero when you first start the game but as soon as you enter a game, either SP or MP, it changes to reflect the number of players in the current game.

      The address is 0x50F500

    8. #7
      Coder
      Love Nabi Muhammad SAW
       
      Friendly
       
      lukaluka's Avatar
      Join Date
      Jul 2015
      Posts
      209
      Thanks (-->)
      15
      Thanks (<--)
      12
      Advertise on GuidedHacking
      Quote Originally Posted by FloppyWhale View Post
      Hi guys! I've been trying to make something to where it checks how many names are in the pointer address for the player array. I'm quite stuck actually all I have so far results in the game crashing.

      Here's my function for getting the players: (The 32 is the max amount of players, I think, are able to play at once).

      void GetPlayers() {
      for each(char string in pEnts->Ents[32]->Name) {
      initialPlayers++;
      }
      }


      Here's the entity class along with the pointer address for it: (Thanks to Rake for entity & player address pointer help).

      class entities {
      public:
      myPlayer * Ents[32]; //There are 32 max players.
      };

      entities * pEnts = (entities*)*(DWORD*)(0x50F4F8);


      Any help/suggestions is greatly appreciated!
      Do Not Use Pointer If You Using ReClass

      this Wrong

      entities * pEnts = (entities*)*(DWORD*)(0x50F4F8);


      this Right

      entities * pEnts = (entities*)(0x50F4F8);

    Similar Game Hacker Threads

    1. [Help] Get When Players Disconnects
      By Virulant in forum Hacking Help
      Replies: 5
      Last Post: 04-26-2016, 02:44 PM
    2. [Help] Find number of players in game
      By wtlyons in forum Assault Cube Hacks
      Replies: 13
      Last Post: 11-28-2015, 04:12 PM
    3. Counter-Strike 2D -> Health other players
      By a6421714 in forum Hacking Help
      Replies: 2
      Last Post: 06-27-2014, 10:00 AM
    4. Finding players names [CS:GO]
      By Obsta in forum Hacking Help
      Replies: 18
      Last Post: 02-03-2014, 11:24 PM
    5. Finding Players Position
      By tariqoo in forum Hacking Help
      Replies: 11
      Last Post: 08-14-2013, 04:08 AM