Solved HELP HOOK VOID

Status
Not open for further replies.

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
I tried to make a void hook but it's not working can anyone tell if I'm wrong?
C++:
bool Climb;


void (*GravityClimb)(void *_this, float value);
void (*_Gravity)(void *player);
void Gravity(void *player) {
    if (player != NULL) {
        if (Climb) {
    GravityClimb(player, 1.0f);
        }
    }
    _Gravity(player);
}

GravityClimb = (void(*)(void *,float))getAbsoluteAddress("libil2cpp.so", 0xA62594);
   HOOK_LIB("libil2cpp.so","0xA64C08", Gravity, _Gravity);


case 10:
            Climb = boolean;
            break;
 
Last edited:
  • Like
Reactions: systen65

DigitalKnight

Approved Modder
Approved Modder
Jul 31, 2018
185
12,200
1,193
23
Within the Heart
From what I can see you are a big modder, can you tell me what would be the best way to make this hook?
I am not gonna spoonfeed you. The hook is correct, it's possible that it's not the function you are looking for, or you are passing the wrong instance. Anyways, goodluck
 

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
Eu não vou te dar de colher. O gancho está correto, é possível que não seja a função que você está procurando, ou você está passando a instância errada. De qualquer forma, boa sorte
[/CITAR]
Obrigado, descobri o erro agora, ela tá funcionando certo
 

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
I am not gonna spoonfeed you. The hook is correct, it's possible that it's not the function you are looking for, or you are passing the wrong instance. Anyways, goodluck
I found the error, it's working, I thought I made the hook wrong, thanks!
 
Status
Not open for further replies.