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

Solved How can i change 2 offset with a button?

Status
Not open for further replies.

pmtcanavari

Platinian
Hi everyone, i got a question. i was modding a game but i have to change 2 offsets with a button and i dont know how to do that. can u guys help me?

 
Last edited:
C++:
 if(instance != NULL && hack1) // Check if instance isn't NULL to prevent crashes
    {
        return false; // If instance isn't NULL, then make my health 999999
    }

    if(instance != NULL && hack1) // Check if instance isn't NULL to prevent crashes
    {
        return false; // If instance isn't NULL, then make my health 999999
    }
 
Since nobody has given you the correct solution yet, I will try. Assuming you use LGL.
Here:
C++:
//example
struct My_Patches {

    MemoryPatch patch1, patch2;

} hexPatches;


//put this where the other ones are in the menu
hexPatches.patch1 = MemoryPatch::createWithHex(targetLibName, //Normal obfuscate
                                                  string2Offset(OBFUSCATE("0x000000")),
                                                  OBFUSCATE("9A 02 00 E3 1E FF 2F E1"));

hexPatches.patch2 = MemoryPatch::createWithHex(targetLibName, //Normal obfuscate
                                                  string2Offset(OBFUSCATE("0x000000")),
                                                  OBFUSCATE("9A 02 00 E3 1E FF 2F E1"));


//do this in the case/break
case 1:
            feature1 = boolean;
            if (feature1) {
                hexPatches.patch1.Modify();
                hexPatches.patch2.Modify();
            } else {
                hexPatches.patch1.Restore();
                hexPatches.patch2.Restore();
            }
            break;

but im not sure what you are using to make this cheat, if this works then great but some more details would be appreciated
 
Last edited:
thank you so much man, it worked for me
 
it worked but when i add another button its not working, only one button is working. what should i do?


C:
Bypass = jboolean1;
            if (Bypass) {
                PMT.Bypass.Modify();
    PMT.AntiBan.Modify();
            } else {
                PMT.Bypass.Restore();
    PMT.AntiBan.Restore();
            }
            break;
  
   case 2:
   AntiBanx = jboolean1;
            if (AntiBanx) {
                PMT.AntiBanx.Modify();
            } else {
                PMT.AntiBanx.Restore();
            }
            break;

PMT.Bypass = MemoryPatch::createWithHex("libil2cpp.so",0xB321100,"00 04 A0 E3");
PMT.AntiBan = MemoryPatch::createWithHex("libil2cpp.so",0x23E43D8,"00 10 A0 E3");
PMT.AntiBanx = MemoryPatch::createWithHex("libil2cpp.so",0x22438CC,"3D 32 17 3F");
 
This is a little trimmed up, but im assuming it looks like this?
C++:
 case 1:
Bypass = jboolean1;
       if (Bypass) {
         PMT.Bypass.Modify();
         PMT.AntiBan.Modify();
       } else {
         PMT.Bypass.Restore();
         PMT.AntiBan.Restore();
       }
       break;

  case 2:
  AntiBanx = jboolean1;
        if (AntiBanx) {
           PMT.AntiBanx.Modify();
        } else {
           PMT.AntiBanx.Restore();
        }
        break;
May I ask what jboolean1 is? Because normally with LGL you would just do
AntiBanx = boolean;
 
idk actually because im using another theme, not the LGL. so its like that in that theme.
so the problem is that, lets say i created 2 button. first button is working but second one is not. idk why
 
idk actually because im using another theme, not the LGL. so its like that in that theme.
so the problem is that, lets say i created 2 button. first button is working but second one is not. idk why
If it has the same method to add features, try adding a specific case number to the button
C++:
OBFUSCATE("1_ButtonOnOff_Test"),
 
Status
Not open for further replies.