Help! Help Hook Damage multiplier

Erothots

Solid & Active Platinian
Hello everyone, can someone show me how to hook the Damage multiplier, I tried this
C++:
float (*old_atk)(void *instance);
float get_atk(void *instance) {
    if (instance != NULL && Atk > 1) {
        return (float) Atk;
    }
    return old_atk(instance);
}

HOOK_LIB("libil2cpp.so", "0xce0eb4", get_atk, old_atk);

case 11:
            Atk = value;
            break;

But the problem is that the Damage value will be equal to the slider value, instead of multiplied. Can anyone help me?
Sorry for using Google translate :pepe023:
 
float (*old_atk)(void *instance);
float get_atk(void *instance) {
if (instance != NULL && Atk > 1) {
return (float) Atk;
}
return old_atk(instance) * (float)Atk;
}

Is that right? :pepe008:


float (*old_atk)(void *instance);
float get_atk(void *instance) {
if (instance != NULL && Atk) {
return old_atk(instance) * (float)Atk;
}
return old_atk(instance) ;
}

try this
 
Back
Top Bottom