Quote:
Originally Posted by QBassiQ
thanks Moep
if (packet[2] == 0x32)
{
//player appear
DWORD id;
memcpy((void*)&id,(void*)((DWORD)packet+3),4);
char name[255]={0};
memcpy((void*)&name,(void*)((DWORD)packet+7),16);
printf("Player: [ID: %d Name: %s]\n",id,name);
memcpy((void*)&(Player[i].Classe),(void*)((DWORD)packet+7+aftername+1),1);
How i get that offset and the size
|
well, thats easy

First of all, give the buffer out byte for byte, something like that:
Code:
for(i=0;i<=size;i++)
{
cout << buf[i];
}
you gonna see something like "2F 16 A3 B7..." I'm not sure about the packet structure(too lazy to look it up

) but it's something like size = 2bytes, header =1 byte. As I said, not quite sure

Just test with some known packets.
The offset is the position where the data starts. In your example packet+3 means, the data you want starts after the 3. byte if I remember right, just test it ^.^
Just count the bytes for the size