This is the AMP version of this page.
If you want to load the real page instead, click this text.

Solved Call a pointer without update

Status
Not open for further replies.

3.Sav.Modz

Platinian
Game is FWD assault [for testing]
if we have a method like this

we can simply call it using the update offset which is this

with a code like this

C++:
bool RefillAmmoInAllWeaponsHook = false; 


 void (*RefillAmmoInAllWeapons)(void* instance); 
 
 void(*old_RefillAmmoInAllWeaponsUpdate) (void *instance); 
 void RefillAmmoInAllWeaponsUpdate(void *instance) { 
 if(instance != NULL) { 
 if (RefillAmmoInAllWeaponsHook){ 
 RefillAmmoInAllWeapons(instance); 
 } 
 } 
 old_RefillAmmoInAllWeaponsUpdate(instance); 
 }  

void *hack_thread(void *) {
    do {
        sleep(1);
    } while (!isLibraryLoaded(targetLibName));
   
#if defined(__aarch64__) 
#else 
RefillAmmoInAllWeapons = (void(*)(void *))getAbsoluteAddress(targetLibName, string2Offset(OBFUSCATE_KEY("0x687D6C", 'A'))); 

MSHookFunction((void *) getAbsoluteAddress(targetLibName, 0x6A7A38),
(void *) RefillAmmoInAllWeaponsUpdate, (void **) &old_RefillAmmoInAllWeaponsUpdate);
 
#endif

    return NULL;
}

Result for this , when the button is on the method will be called and ammo will always be refilled [tested working]
My Question is : how to call this method without the use of the update method . [in case the class itself does not have any update method.]
 
not all methods. this one should be called in its class
ya , not all methods, but how about a pointer with 1 paramater like int such as this :
Public void AddGold (int amount) { }
and no update in its class , so how to make a pointer to it
> using another update from another class will not work at 90 % of the time .
 
ohh i know but u must understand by yourself
 



u dont need update for this u can just hook the parameter inside the function with simple code.
 
Status
Not open for further replies.