LightbulbReading an EntityList

Posts 12 of 2 · Page 1 of 1
Reading an EntityList
Greetings,
I am currently trying to develop my own hack for a source engine game.

I found the EntityList offset, and i looked into it.
I noticed it was like something of sorts: (in the image)
h t t p : / / i.imgur.com/HrI6KLV.jpg

(It doesnt work to upload files trough the phone apparently)

So, my player is located in the 1st address, but the second is X bytes away. From the 2nd player on, the next player will always be 10 bytes in front.

The function i use to read the addresses is the following:

Code:
ReadProcessMemory(phandle,(void*)address,&value,sizeof(value),0); //Read what is in "address" and store it in "value", then what is the size of what we are going to read which is "value",and finally the number of bytes read
My code:

Code:
const DWORD EntityPlayer_Base = 0xABCEF;
const DWORD EntityLoopDistance = 0x10;
const DWORD EntityLoopFirst = 0xFC  //distance from Myplayer to second player

struct PlayerList_t{
     DWORD CBaseEntity;
     Void ReadInformation(int player){
          ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + EntityPlayer_Base + (player * EntityLoopDistance)), &CBaseEntity, sizeof(DWORD), 0);
     }
}
Like this i am only reading every 0x10 bytes from the addresses from the beggining...

Could any1 tell me how to proceed from my player to the second?

Thanks in advance!
Code:
const DWORD EntityPlayer_Base = 0xABCEF;
const DWORD EntityLoopDistance = 0x10;
const DWORD EntityLoopFirst = 0xFC  //distance from Myplayer to second player

struct PlayerList_t{
     DWORD CBaseEntity;
     Void ReadInformation(int player){
          ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + EntityPlayer_Base +EntityLoopFirst+ ((player-1) * EntityLoopDistance)), &CBaseEntity, sizeof(DWORD), 0);
     }
}
I think this can loop all enemies (PL2,3,4...)
You can consruct myPlayer and it will be OK.
Posts 12 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?