[GTA San Andreas]CPed?

Posts 1–12 of 12 · Page 1 of 1
[GTA San Andreas]CPed?
i've found a huge page of addresses in GTA San Andreas:
Memory Addresses (SA - GTAModding)
It says that the X coordinate of the player isCPed+0x14) +0x30
and the Y coordinate of the player is: (CPed+0x14) +0x34
and the Z coordinate of the player is: (CPed+0x14) +0x38
and CPed is: 0xB6F5F0
and the X,Y,Z are DWORDs.
i've created a dll file which tries the following:
Code:
DWORD* X = (DWORD*)(0xB6F5F0 + 0x14) + 0x30;
DWORD* Y = (DWORD*)(0xB6F5F0 + 0x14) + 0x34;
DWORD* Z = (DWORD*)(0xB6F5F0 + 0x14) + 0x38;
but it doesn't works.
help please???
you did not say, what you want from these codes.
i want to send a messagebox that writes these coordinates as a message
Quote Originally Posted by YoavX View Post
i want to send a messagebox that writes these coordinates as a message
Errr.... wdf would you want to do that o_O?

DWORD* Z = (DWORD*)(0xB6F5F0 + 0x14) + 0x38;
char buff[50];
snprintf(buff, sizeof buff, "%f", (float)*Z);
MessageBoxA(NULL, "Print", buff, MB_OK);
CPed + 0x14 is a pointer to the location/rotation.
DWORD *X = (*(DWORD*)(0xB6F5F0 + 0x14))+0x30;
DWORD *X = (*(DWORD*)(0xB6F5F0 + 0x14))+0x30;
doesn't works, makes an error:
cannot convert from 'DWORD' to 'DWORD *'

DWORD* Z = (DWORD*)(0xB6F5F0 + 0x14) + 0x38;
always gives the same value
Quote Originally Posted by YoavX View Post
DWORD *X = (*(DWORD*)(0xB6F5F0 + 0x14))+0x30;
doesn't works, makes an error:
cannot convert from 'DWORD' to 'DWORD *'

DWORD* Z = (DWORD*)(0xB6F5F0 + 0x14) + 0x38;
always gives the same value
[php]
DWORD *X = (*(DWORD**)(0xB6F5F0 + 0x14))+0x30;
[/php]
DWORD *X = (*(DWORD**)(0xB6F5F0 + 0x14))+0x30;
char buff[256];
sprintf(buff,"%f", (float)*X);
MessageBoxA(NULL, buff, buff, MB_OK);

crashes the game when used
Quote Originally Posted by YoavX View Post
DWORD *X = (*(DWORD**)(0xB6F5F0 + 0x14))+0x30;
char buff[256];
sprintf(buff,"%f", (float)*X);
MessageBoxA(NULL, buff, buff, MB_OK);

crashes the game when used
We're not gonna spoonfeed you the solution...
Quote Originally Posted by YoavX View Post
DWORD *X = (*(DWORD**)(0xB6F5F0 + 0x14))+0x30;
char buff[256];
sprintf(buff,"%f", (float)*X);
MessageBoxA(NULL, buff, buff, MB_OK);

crashes the game when used
We're not going to hack the game for you. With what you've given us the only thing we can do is help with syntax.
Off topic but lol @ toxified's sig
Quote Originally Posted by KABLE View Post
Off topic but lol @ toxified's sig
Oh, lol xD.. I turn my sigs off so I didn't notice that till you pointed it out.

Oh well... This guys isn't posting sufficient code to know what the problem is... =/
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?