:getChatEntryText
0AF7: samp 1@ = get_base
1@ += 0x212A6C
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 // size of stChatEntry
005A: 1@ += 0@ // (int)
1@ += 28
0AB2: ret 1 1@
HooThaFuck link said:This is what Opcode gave me to memory hack it.
Code::getChatEntryText 0AF7: samp 1@ = get_base 1@ += 0x212A6C 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 1@ += 0x136 0@ *= 252 // size of stChatEntry 005A: 1@ += 0@ // (int) 1@ += 28 0AB2: ret 1 1@
So the offset is 0x212A6C right?
int obtenerMensajeChat(HANDLE *procesoGTA, DWORD *direccionBase, int entrada, char *destino) {
if(*procesoGTA == NULL || *direccionBase == DIR_NULA || direccionBase == NULL)
return 0;
DWORD dir;
int resultado = ReadProcessMemory(*procesoGTA, (LPVOID)(*direccionBase + DIR_INFO_SAMP_CHAT), &dir, sizeof(dir), NULL);
if (!resultado)
return 0;
// Escalamos hasta la dirección del mensaje...
dir += 0x136;
entrada *= 252;
dir += entrada;
dir += 28;
// Lo leemos
ReadProcessMemory(*procesoGTA, (LPVOID)dir, destino, MAX_CAR_MENSAJE_CHAT_SAMP, NULL);
return 1;
}
That's not the point, the snippet contained the addresses he needed.0B36 link said:That's the snippet for CLEO only.
HooThaFuck link said:That's not the point, the snippet contained the addresses he needed.
atleast it saved him the hassle to get offsets by the structures (since he actually was in need todo the math based on size of the type0B36 link said:and, that's also not needed because s0beit's samp.h has them all listed and defined, which MyU already linked before you posted.
This and the fact that his code is literally the same as the cleo code but converted. XDMyU link said:atleast it saved him the hassle to get offsets by the structures (since he actually was in need todo the math based on size of the type)