markitosx666
New User
- 12
- 01/05/22
- 4
Thread Author
Hello guys, I'm trying to hook and change the field value of a class like this:
I tried everything but when I press the skill button in the game, it crashes. I read in another forums that I need Update method, but here there isn't any method called Update or LateUpdate, so... How can I modify the value? There is the code I used which DON'T CRASH the game but doesn't work:
The offset I use is the class one, I think that's the problem but I don't know.
Someone can help me? Thanks ^^.
I tried everything but when I press the skill button in the game, it crashes. I read in another forums that I need Update method, but here there isn't any method called Update or LateUpdate, so... How can I modify the value? There is the code I used which DON'T CRASH the game but doesn't work:
C++:
void(*old_skill)(void* instance);
void skill(void* instance) {
*(float*)((uint64_t)instance + 0xF0) = 9999.0f;
old_skill(instance);
}
A64HookFunction((void*)getAbsoluteAddress(targetLibName, offset), (void*)skill, (void**)&old_skill);
The offset I use is the class one, I think that's the problem but I don't know.
Someone can help me? Thanks ^^.