Solved Hook

Status
Not open for further replies.

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
please teach me how to make a void hook

I made some attempts but it didn't work.

give me an example please

C++:
0x430CB4 public void EarnCoin(count, int) { }

0x4307E4 private void Update() { }
 
Last edited:

HekaHeka709

Solid & Active Platinian
Dec 29, 2021
57
9
8
21
Phillipines
Hook it using update

EarnCoin(void *instance, int);

void (*Update)(void *instance);
void _Update(void *instance) {
if (instance != NULL) {
EarnCoin(instance, <prefferred value>);
}
Update(instance);
}
 

DaRealPanDa

Co-Administrator
Staff member
Supporting-Team
Global Moderator
Social Media
Mar 12, 2018
6,909
15,849
2,120
27
Skyrim
Hey,

is this answer good enough for you?

Then it would be cool if you could change the prefix from your thread from "help" to "solved" or i can do that for you if you want.
 

Poison Modz

Approved Modder
Approved Modder
Aug 27, 2020
159
11,888
1,193
India
bool EarnCoin = false;

void (*EarnCoins)(void *instance, int count);

void (*old_coinsUpdate)(void *instance);
void coinsUpdate(void *instance){
if (instance != NULL){
if (EarnCoin){
EarnCoins(instance, 100000);
}
}
return old_coinsUpdate(instance);
}

MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x4307E4), (void *) coinsUpdate, (void **) &old_coinsUpdate);

EarnCoins = (void(*)(void *,int))getAbsoluteAddress(libil2cpp.so, 0x430CB4);

OBFUSCATE("Toggle_Earn Coins"), //0 Case

case 0:
EarnCoin = boolean;
break;
 

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
Hey,

is this answer good enough for you?

Then it would be cool if you could change the prefix from your thread from "help" to "solved" or i can do that for you if you want.
Sorry, I'm new to this site and I don't know much about it, sorry this won't happen again.
 
  • Like
Reactions: Yaskashije

BeginnerBR

Solid & Active Platinian
Original poster
Sep 4, 2022
62
14
8
24
Brasil
Hey,

is this answer good enough for you?

Then it would be cool if you could change the prefix from your thread from "help" to "solved" or i can do that for you if you want.
Sorry but how can I change the prefix? I'm using the site on my cell phone and I can't find the option to change the prefix
 
Status
Not open for further replies.