I tried to save it to addpointsBtn to use, it worked but the game crashed immediately. Hope everyone will help !
Nó đây : // RVA: 0x769774 Offset: 0x769774 VA: 0x769774Nó là gì bool, int, float, void, field offset..bạn muốn nối chức năng gì tiền, vàng, sức khỏe?....
bool AddPoints;
void (*addPoints)(void *instance, int value);
void (*old_Update)(void *instance);
void Update(void *instance) {
if(instance!=NULL) {
if(AddPoints) {
addPoints(instance, 9999);
AddPoints=false;
}
}
old_Update(instance);
}
HOOK("0xOFFSET", Update, old_Update);
case 5:
AddPoints = !AddPoints;
break;
That's not what I meant, I want when the game calls that function it will save the void instance pointer to addpointsBtn and I can use it without the game having to call it, I tried it and it seems to work but the game was thrown again. Thank you for your answer <3You need to hook an update function from the class then hook void addPoints(int pointsToAdd) {} through that like this....
C++:bool AddPoints; void (*addPoints)(void *instance, int value); void (*old_Update)(void *instance); void Update(void *instance) { if(instance!=NULL) { if(AddPoints) { addPoints(instance, 9999); AddPoints=false; } } old_Update(instance); } HOOK("0xOFFSET", Update, old_Update); case 5: AddPoints = !AddPoints; break;
Oh okThat's not what I meant, I want when the game calls that function it will save the void instance pointer to addpointsBtn and I can use it without the game having to call it, I tried it and it seems to work but the game was thrown again. Thank you for your answer <3