slaimmials
Rookie
im newbie in modding, dont kill me pls :)
First problem
I found the method I needed:
I hooked it:
but I dont know how to change its parameters, because it is an unknown class.
Second problem
i need to call it, but how?
i tried this:
but it doesnt work.
First problem
I found the method I needed:
I hooked it:
C++:
int (*old_TakeDamageHook)(void *instance, void* attackResult);
int TakeDamageHook(void *instance, void* attackResult) {
if (godmode) {
//im stuck here, attackResult have a Field "Damage", how can i edit it?
}
return old_TakeDamageHook(instance, attackResult);
}
Second problem
i need to call it, but how?
i tried this:
C++:
void (*DieHook)(void *instance) = (void (*)(void*))(0x12340B4);
DieHook();