Hi..
So I again (actually still) have issues with isSwitchWithIdentifierActive option in iGMenu.
This is the code I used:
void (*add_Money)(void *cheats) = (void (*)(void *))getRealOffset(0xOffset);
//original value or smth lul
void(*old_Update)(void *cheats) = nil;
bool isFeatureActive = false;
// make function of LateUpdate offset
void Update(void *cheats) {
if(isFeatureActive == false){
old_Update(cheats);
} else {
add_Money(cheats);
}
}
//under void startAuthentication() {
MSHookFunction((void*)getRealOffset(0xOffset),(void*)Update,(void**)&old_Update); //Class: SomeClass -> Func: LateUpdate
isFeatureActive = [menu isSwitchWithIdentifierActive:@"Switch1"];
[menu addSwitchWithIdentifier:@"Switch1"
title:@"Add Money"
description:@"Enable me for something awesome!"];
//under listener changes:
isFeatureActive = [menu isSwitchWithIdentifierActive:@"Switch1"];
This does not work at all, however if I use this code, it does work perfectly fine.
void Update(void *cheats) {
if(1 < 2){
add_Money(cheats);
}
old_Update(cheats);
}
Any idea what might issue the first code?