August 30, 2022 at 1:18 PM
#hacktread #askMethod hacking : internal.Offset crash whenever i read memory and there is array pointer with address != 0. and i read memory by using loop and fetch id via entPlayer->id i get crash. example :pointer 00,04,08,0C, there is data and can fetch it works.pointer 010,028,02C, i checked this on cheat machine but this pointer with this offset with the value '??' my program crashed.question : HOW TO SOLVE IT ??[code]class ent{public: uint32_t id; //offset 0x00 char name[16]; //offset 0x004 float xPos; //offset 0x006 float yPos; //offset 0x007 float zPos; //0ffset 0x008 float HP; //offset 0x0016}DWORD getPointerAddr(DWORD ptr, std::vectoroffs){ DWORD ptr; for(int i = 0; i < offs.size(); i++){ ptr = *(DWORD*)(ptr); ptr += offs[i]; } return ptr}//GetPlayer.hent* entPlayer;////GetPlayer.cpp reading all array of pointers.DWORD offs = 0x00;for (int i = 0; i < 136; i++) // reading all array of pointers{ std::vectordefaultOffs = { offs,0x00 }; entPlayer = (EntityMobs*)getPointerAddr((DWORD)moduleBase + addresses.entityStartPlayer,defaultOffs); if (entPlayer->id > 0) { float rangeEnt = sqrt(pow(self->xPos - entPlayer->xPos, 2) + pow(self->yPos - entPlayer->yPos, 2) + pow(self->zPos - entPlayer->zPos, 2)); if (rangeEnt >= 0 && rangeEnt <= distance && entPlayer->HP != 0) { distance = rangeEnt; id = entPlayer->id; } }offs += 0x04;Sleep(delay);}[/code]
