Thank you guys very, very much it completely solved that problem.
One last question is how can I get this to work with multiple complex addresses?
I am trying to get it to work for just two complex addresses currently, but I believe I will be using more than that in the future of my current script.
Trying to use the same code twice returns an error staing that "poBase" is already declared. If I change it to something such as "poBaseX" then it says that "playerXCoord" is an undeclared identifier (Line: 45).
I've tried declaring playerXCoord (and playerYCoord) before the functions, but it then causes the script to have absolutely no effect in-game.
Sorry for all of the questions.
My Code with the first as "poBaseX":
- Code: Select all
float saved_X_Loc = 0;
float saved_Y_Loc = 0;
float saved_X_Loc2 = 0;
float saved_Y_Loc2 = 0;
extern struct playerXAddy {
struct {
BYTE bBuffer[0x8];
struct {
BYTE bBuffer[0x54];
struct {
BYTE bBuffer[0x1C];
FLOAT playerXCoord;
} * poObj;
} * poObj;
} * poObj;
} * poBaseX = { "", 0x149E928 };
void On_Open_CLIENT_EXE( DWORD dw1, DWORD dw2 ) {
poBaseX->poObj->poObj->poObj->playerXCoord = 0;
}
extern struct playerYAddy {
struct {
BYTE bBuffer[0x8];
struct {
BYTE bBuffer[0x54];
struct {
BYTE bBuffer[0x24];
FLOAT playerYCoord;
} * poObj;
} * poObj;
} * poObj;
} * poBase = { "", 0x149E928 };
void On_Open_CLIENT_EXE( DWORD dw1, DWORD dw2 ) {
poBase->poObj->poObj->poObj->playerYCoord = 0;
}
VOID On_HK_CLIENT_EXE_1( DWORD dw1, DWORD dw2 ) { //Save Location1
saved_X_Loc = playerXCoord;
saved_Y_Loc = playerYCoord;
Sleep(10);
}
Edit: Fixed a typo in the code