GamerBoi2020
Platinian
Hi,
When I switch the toggle ON in my LGL Mod menu, the cheat gets activated. But when I switch the toggle OFF the cheat is still activated. It only gets deactivated if I leave the mission and go back in. Any ideas?
Here is my code:
Thanks in advance!
When I switch the toggle ON in my LGL Mod menu, the cheat gets activated. But when I switch the toggle OFF the cheat is still activated. It only gets deactivated if I leave the mission and go back in. Any ideas?
Here is my code:
Code:
#include "Includes/Macros.h"
bool feature1, feature2, featureHookToggle, Voidhookingfloat = false;
float InteractionSpeed;
float SpeedModifier;
int sliderValue = 1, level = 0;
void *instanceBtn;
void (*Anyname)(void *instance,float value);
void (*_Voidfloathooking)(void *instance);
void Voidfloathooking(void *instance) {
if (instance != NULL) {
if (Voidhookingfloat) {
Anyname(instance, 9.95106e+31);
}
}
return _Voidfloathooking(instance);
}
HOOK_LIB("libil2cpp.so","0xXXXXXX",Voidfloathooking,_Voidfloathooking);
Anyname = (void (*)(void *, float))getAbsoluteAddress("libil2cpp.so",0xXXXXXX);
case 50:
Voidhookingfloat = boolean;
if (boolean) {Toast(env,obj,OBFUSCATE("One-Hit Kill Enabled"),ToastLength::LENGTH_SHORT);
}
break;
Thanks in advance!