Help! hook without update

BeginnerBR

Solid & Active Platinian
Can someone more experienced show the error?

I'm trying to hook a field that doesn't have an update but something is going wrong, could someone show me the error?
C++:
bool Coin;

void (*old_update)(void* _this);
void update(void* _this) {
if(_this != NULL) {
void *MoneyClass = *(void**)((uint64_t)_this + 0x20);
{
if(Coin != NULL) {
*(int *) ((uint64_t) MoneyClass + 0x10) = 999;
}
}
}
        old_update(_this);
}



MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x81C0EC), (void *) update, (void **) &old_update);
 
Solution
Me trying to modify hide online, in the "class GameRules", it has the bombs cooldown but it doesn't have an update and I'm not able to modify it
1668140787766.png


You can access the GameRules class via this instance here
Pretty sure most of the games doesnt have the Coins as a field Offset, so the chances to work will be very low, also if that class doesnt have an update function, Search up for other classes that are similar with your class and use its update class, but before this i suggest you to Make sure You have looked attently when You searched for update because "Private void update()" is not the only update function that could work, there can be Like "LateUpdate" or "FixedUpdate" so Make sure =)
 
Pretty sure most of the games doesnt have the Coins as a field Offset, so the chances to work will be very low, also if that class doesnt have an update function, Search up for other classes that are similar with your class and use its update class, but before this i suggest you to Make sure You have looked attently when You searched for update because "Private void update()" is not the only update function that could work, there can be Like "LateUpdate" or "FixedUpdate" so Make sure =)
I already checked this class does not have lateupdate, fixedupdate or private update, and I checked this field is the value of the coins (I tested it via gameguardian)
Sorry if you don't understand what I said, my English is terrible.
 
Back
Top Bottom