Help! LGL MOD MENU

erikc9696

Rookie
How create this in LGL MOD MENU

// RVA: 0x226BDD4 Offset: 0x226BDD4 VA: 0x226BDD4
public void addUnlimitedShuffleTime(int time, bool force = False) { }
 
Hook it through an Update, LateUpdate or FixedUpdate method, usually found in the same class...

C++:
bool ShuffleTime;


void (*addUnlimitedShuffleTime)(void *instance, int time, bool force);
void (*old_Update)(void *instance);
void Update(void *instance) {
    if(instance!=NULL) {
        if(ShuffleTime) {
            addUnlimitedShuffleTime(instance, 9999, false);
            ShuffleTime=false;
        }
    }
    old_Update(instance);
}

Then under hackthread...

C++:
addUnlimitedShuffleTime = (void(*)(void*, int, bool)) getAbsoluteAddress(targetLibName, 0x226BDD4);

HOOK("UPDATE OFFSET HERE", Update, old_Update);

Then finally add your menu item and case...

C++:
OBFUSCATE("Button_Add Shuffle Time),


Case XX:
    ShuffleTime = !ShuffleTime;
    break;
 
Back
Top Bottom