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

Help! how do i reset it to false when i change

alsya

Solid & Active Platinian
how to do not freeze values in lgl mod menu?? do i have to remove the return value in the hook?

C++:
int (*old_UpdateHealth)(void *instance, int HP, int BASEHP);
int HealthUpdate(void *instance, int HP, int BASEHP) {
    if(instance != NULL && sliderValue > 1) {
        (int) sliderValue;
    }
    return old_UpdateHealth(instance, HP, BASEHP);
}
is it like that?? be a value not freeze??
 
I'm not sure what you're doing here, but it's wrong. If you're trying to reset it, meaning setting the value to the original value. Just turn it off or set it back to default.

Again this is wrong.

I don't know what your slider is leading to, but it's not gonna work.

C++:
int (*old_UpdateHealth)(void *instance, int HP, int BASEHP);

your slider should only be returning the HP or BASEHP

old_UpdateHealth(instance, sliderValue, HP);

OR

old_UpdateHealth(instance, HP, sliderValue);
 
[SEMBUNYIKAN][/SEMBUNYIKAN]
 
does it have to be like this? or use return??

Code:
void (*old_UpdateHealth)(void *instance, int HP, int BASEHP);
void HealthUpdate(void *instance, int HP, int BASEHP) {
    if(instance != NULL && sliderValue > 1) {
        old_UpdateHealth(instance,HP,sliderValue);
    }
    return old_UpdateHealth(instance, HP, BASEHP);
}