oh I see. I'm just curious about how to use updates in other classes. Have you ever used the PurulianCheaterz Offset Tester?What do you mean? Like an update from a different class than the class AddItem is in?
You don't need to change any code just the update offset, you can technically use update from any class when hooking regular methods but sometimes they don't all work which is why it's best to use update from the same class as the method you're hooking
It mostly comes down to trial and error, and no I haven'toh I see. I'm just curious about how to use updates in other classes. Have you ever used the PurulianCheaterz Offset Tester?
Ouh, I'm just curious how to do a hook using update in another class. like the one on the Purulian offset testerIt mostly comes down to trial and error, and no I haven't
Easy, here are some examples...Ouh, I'm just curious how to do a hook using update in another class. like the one on the Purulian offset tester
void (*old_PlayerController_Update)(void *instance);
void PlayerController_Update(void *instance) {
if(instance!=nullptr) {
if(Example1) {
SpeedBoost(instance, 9999);
}
}
old_PlayerController_Update(instance);
}
void (*old_PlayerCamera_FixedUpdate)(void *instance);
void PlayerCamera_FixedUpdate(void *instance) {
if(instance!=nullptr) {
if(Example2) {
*(float *) ((uint64_t) instance + 0x4C) = 10.0;
}
}
old_PlayerCamera_FixedUpdate(instance);
}
HOOK("0x747C2D", PlayerController_Update, old_PlayerController_Update);
HOOK("0x7411CD", PlayerCamera_FixedUpdate, old_PlayerCamera_FixedUpdate);
Isn't an instance pointer needed to access another class? In which games does this work, can you name at least one game, and the necessary offsets? I imagined a situation where in classCurrency there is an int field coins 0x10, but there is no update method in this class, but Update is in classMoney (these classes are obviously similar), but in classMoney there is already a field with an offset of 0x10 (for example, string TypeName 0x10), or there is no field with an offset of 0x10 at all, then how will the value of the int coins field in the classCurrency change if using update from classMoney? It's unclear.void (*old_PlayerController_Update)(void *instance); void PlayerController_Update(void *instance) { if(instance!=nullptr) { if(Example1) { SpeedBoost(instance, 9999); } } old_PlayerController_Update(instance); }
2)
void (*old_PlayerCamera_FixedUpdate)(void *instance); void PlayerCamera_FixedUpdate(void *instance) { if(instance!=nullptr) { if(Example2) { *(float *) ((uint64_t) instance + 0x4C) = 10.0; } } old_PlayerCamera_FixedUpdate(instance); }
My examples are just showing how to use more than one update hook, not how to use an update from a different class when there's no update in the class you're hooking field offsets from. For that yes you do need an instance pointerIsn't an instance pointer needed to access another class? In which games does this work, can you name at least one game, and the necessary offsets? I imagined a situation where in classCurrency there is an int field coins 0x10, but there is no update method in this class, but Update is in classMoney (these classes are obviously similar), but in classMoney there is already a field with an offset of 0x10 (for example, string TypeName 0x10), or there is no field with an offset of 0x10 at all, then how will the value of the int coins field in the classCurrency change if using update from classMoney? It's unclear.
Thank you in advance for the clarification