Solved Hooking

Status
Not open for further replies.

ASDFGHJKLQWE

Solid & Active Platinian
Original poster
Jul 10, 2022
65
19
8
Nepal
Can anyone can tell me how to hook this
// RVA: 0x144B554 Offset: 0x144B554 VA: 0x144B554
public long get_Coins()

It's in long what should I need to use int/float I like to know ..
 

xyzhunter

PMT Modder
Staff member
Modding-Team
Oct 28, 2020
2,147
113,422
1,213
Indonesia
change to long :

long(*old_Kills)(void *instance);
long Kills(void *instance) {
//Check if instance is NULL to prevent CRASH
if (instance != NULL)
{
return 99999l; //Return how many value
}
//return the original value (this code isn't really needed if you have a toggle/switch)
return old_Kills(instance);
}

HOOK_LIB("libil2cpp.so", "0x123456", Kills, old_Kills);
 

ASDFGHJKLQWE

Solid & Active Platinian
Original poster
Jul 10, 2022
65
19
8
Nepal
change to long :

long(*old_Kills)(void *instance);
long Kills(void *instance) {
//Check if instance is NULL to prevent CRASH
if (instance != NULL)
{
return 99999l; //Return how many value
}
//return the original value (this code isn't really needed if you have a toggle/switch)
return old_Kills(instance);
}

HOOK_LIB("libil2cpp.so", "0x123456", Kills, old_Kills);
Thanks for the help and I need to try
 

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,895
15,743
2,120
27
Skyrim
Thread will be set to "solved" and closed.
When you're not happy with that just send me a message and i will re-open the thread for you.

Thanks.
 
  • Like
Reactions: ASDFGHJKLQWE
Status
Not open for further replies.