CHEATS GAMES
Solid & Active Platinian
[FieldOffset(Offset = "0x8")]
(float*)((uint32_t)instance + 0xc) = 12.0f; //protected int health;
(float*)((uint32_t)instance + 0xc) = 12.0f; //protected int health;
//No need
struct My_Patches {
MemoryPatch blah, blah, blah;
} hexPatches;
//Do this:
bool Example = false;
void (*old_AnyName)(void *instance);
void AnyName(void* instance) {
if (instance != NULL) {
if (Example) {
*(int/*Example if the Offset is BOOL, FLOAT, INT, VOID, DOUBLE. Then replace the int.*/ *) ((uint64_t/*Change the 64 if you're going to use 32.*/) instance + 0xABCD/*The Field Offset here*/) = 1234567890/*Change this to TRUE, FALSE, VALUE/NUMBER. If you Offset has a ability of something else.*/;
}
}
return/*Remove this return, if you're going to use something else. But i prefer for you to keep this.*/ old_AnyName(instance);
}
#if defined(__aarch64__) //If you want to do Armv8 Hook Function then:
A64HookFunction((void *)getAbsoluteAddress(targetLibName/* <-- Just replace something else if #define targetLibName OBFUSCATE("TargetLibNameHere") is not working.*/, 0x123456/* <-- The Normal Offset Here.*/), (void *)AnyName, (void **)&old_AnyName);
#else //If you are going to do Armv7 Hook Function then:
MSHookFunction((void*)getAbsoluteAddress(targetLibName/*Same as above*/, 0x123456/*Same as above's explanation*/), (void*)AnyName, (void**)&old_AnyName);
switch (featNum) {
case 0:
Example = boolean;
break;
}