Let's say I have this method:
private int AmmoAmount(){}; // 0xOFFSET
And I wanted hook it and multiply or add my current ammo amount instead of returning an exact value. How would I do that? Is this how I would do it? Example:
int (*old_AmmoAmount)(void *instance);
int AmmoAmount(void *instance)
{
return old_AmmoAmount(instance) * 10; // Return whatever my current ammo is multiplied by 10
}
return old_AmmoAmount(instance); //Just return exact original value
}
// MSHOOKFUNCTION
Would that work? Basically what I want to do is using arithmetic operators to change my ammo instead of returning an exact value in the hook like we do return 99999;
@Ted2I am sorry for bothering you, but I hope you help me because you are the only one helping people and the android help section is very inactive