Help! Help Hook Damage multiplier

Erothots

Platinian
Original poster
Oct 15, 2023
48
27
18
124
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
 
  • Like
Reactions: Erothots

About us

  • Welcome to platinmods.com! We are proud to present you the place which let's dreams come true! Focusing on quality and trust we have spend much time to build a gaming community fitting to your wishes and needs. Actually we offer you the finest MODs and Games of the Android section and we slowly expand to the iOS section as well. But games, Android MODs & iOS MODs are not the only things we can offer you. We have tutorials, tools, a very friendly, active and solid community which will help you with any problem you have =) Your happiness is our goal. We hope you enjoy!

Forum statistics

Threads
64,097
Messages
2,665,117
Members
4,326,155
Latest member
j01k