power2020202020
Solid & Active Platinian
Hello, I have a problem with my toggle activator. My hooking works fine in the game, but the activator is always on, even when I turn it off in my mod menu. The damage always stays at 9999999. In fact, it already starts with the damage set to 9999999, even with the toggle turned off. I'll post my mod menu.
bool damageonehit = false;
int (*old_damage)(void *instance);
int damage(void *instance) {
if(instance != NULL && damageonehit)
{
return 9999999;
}
return old_damage(instance);
}
MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x17C52E8), (void *) damage, (void **) &old_damage);
OBFUSCATE("10_Toggle_damage one hit") //case 10
switch (featNum) {
case 10:
damageonehit = !damageonehit;
break;
}
}
bool damageonehit = false;
int (*old_damage)(void *instance);
int damage(void *instance) {
if(instance != NULL && damageonehit)
{
return 9999999;
}
return old_damage(instance);
}
MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x17C52E8), (void *) damage, (void **) &old_damage);
OBFUSCATE("10_Toggle_damage one hit") //case 10
switch (featNum) {
case 10:
damageonehit = !damageonehit;
break;
}
}