This is the AMP version of this page.
If you want to load the real page instead, click this text.

Solved Hook Problem

Status
Not open for further replies.

mxiloe

Platinian
Hey y'all, can someone pls open my god damn eyes and tell me whats wrong with the second hook?
Like my bool hook works like a fckng charm but my float hook just does not his job:

Code:
bool UnlockPet = false;


case 4:
     UnlockPet = ! UnlockPet;
  break;


bool (*old_IsUnlockedPet)(void *instance);
bool IsUnlockedPet(void *instance) {
    if (instance != NULL) {
        if (UnlockPet) {
            return true;
        }
    }
    return old_IsUnlockedPet(instance);
}



MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x8F8B6C), (void *) IsUnlockedPet, (void **)&old_IsUnlockedPet);



what is wrong here?:

Code:
bool Heart = false;


case 7:
     Heart = ! Heart;
  break;




float (*old_getHeart)(void *instance);
float getHeart(void *instance) {
    if (instance != NULL){
        if(Heart) {
            return 100.0f;
        }
    }
    return old_getHeart(instance);
}



MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x8F22E8), (void *) getHeart, (void **)&old_getHeart);
 
So whether I hook an int or float or double, the case will always be Hack = boolean and when I hook a bool it’ll always be hack =! hack

JUST USE BOOL TO ACTIVATE ALL CHEATS

case 0:
hack1 = boolean;
break;

case 1:
hack2 = boolean;
break;

case 2:
hack3 = boolean;
break;

case 3:
hack4 = boolean;
break;

case 4:
hack5 = boolean;
break;

case 5:
hack6 = boolean;
break;

case 6:
hack7 = boolean;
break;
 
Status
Not open for further replies.