Help! how to hook field offset type boolean in lgl mod menu

C:
void (*old_BoolExample1)(void *instance);
void BoolExample1(void *instance) {
    if (instance != NULL) {
        if (IsBoolExample1) {
            *(bool *) ((uint64_t) instance + 0x00) = true; // Or you can put return false;.
        }
    }
    return old_BoolExample1(instance);
}
 
Back
Top Bottom