Jump to content

Hack doesn't work when it's enabled, but does when it's disabled.


Go to solution Solved by cz1993,

8 posts in this topic

Recommended Posts

Posted

Hi,

I'm making a hack but I got into a weird problem.

I made a patcher using a template from here, hacking the game using the 'new mshook way by shmoo'.

 

Whenever I turn the hack ON in settings, the hack aint working. (int)

Whenever I turn it OFF, it works perfectly fine. (int)

 

BUT when i turn a boolean function, 'isCheater'  ON, it does work. 

 

I've checked my tweak.xm, but it's fine.

 

I'm confused as f**k xD

 

Anyone got a solution?

Posted

Can you post your Tweak.xm here?

Posted
2 minutes ago, DiDA said:

Can you post your Tweak.xm here?

Yes sorry..

 

#import <UIKit/UIKit.h>
#import <substrate.h>
#import <Foundation/Foundation.h>

//tweak.xm by Chrizk0//
//template by DiDA//

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.Ted2.KimK.plist"
 
inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

//make up any function relevant to your symbols.//

int (*orig_Cash)(void *self);

//*static included before any function to obfuscate while decreasing size in compilation.*//

static int Cash(void *self) {
    if(GetPrefBool(@"key1"))
    {
        return 987654321;
    }
    else
    {
        return orig_Cash(self);
    }
}

static bool Cheat(void *self) {
    if(GetPrefBool(@"key2"))
    {
        return FALSE;
    }
    else
    {
        return orig_Cheat(self);
    }
}




//define your symbols with mshookfunction.//


__attribute__((constructor)) void DylibMain(){

 
MSHookFunction(MSFindSymbol(NULL, "__Z16Player_AwardCashP7SPlayeri"),(void*)Cash, (void**)&orig_Cash);

MSHookFunction(MSFindSymbol(NULL, "__Z22SceneManager_IsCheaterP13SSceneManager"),(void*)Cheat, (void**)&orig_Cheat);
}
%end 

 

Posted
MSHookFunction(MSFindSymbol(NULL, "__Z16Player_AwardCashP7SPlayeri"),(void**)&orig_Cash, (void*)Cash);

MSHookFunction(MSFindSymbol(NULL, "__Z22SceneManager_IsCheaterP13SSceneManager"),(void**)&orig_Cheat, (void*)Cheat);

 

maybe works

Posted
7 minutes ago, cz1993 said:

MSHookFunction(MSFindSymbol(NULL, "__Z16Player_AwardCashP7SPlayeri"),(void**)&orig_Cash, (void*)Cash);

MSHookFunction(MSFindSymbol(NULL, "__Z22SceneManager_IsCheaterP13SSceneManager"),(void**)&orig_Cheat, (void*)Cheat);

 

maybe works

Got a bucn of errors lol.

 

/var/mobile/kimk/theos/include/substrate.h:310:20: note: candidate function
      [with Type_ = void] not viable: no known conversion from 'void **' to
      'const char *' for 2nd argument
static inline void MSHookFunction(MSImageRef image, const char *name, Ty...
                   ^
/var/mobile/kimk/theos/include/substrate.h:284:20: note: candidate template
      ignored: deduced conflicting types for parameter 'Type_'
      ('void' vs. 'void *')
static inline void MSHookFunction(Type_ *symbol, Type_ *replace, Type_ *...
                   ^
/var/mobile/kimk/theos/include/substrate.h:303:20: note: candidate template
      ignored: could not match 'type-parameter-0-0 *' against 'void'
static inline void MSHookFunction(const char *name, Type_ *replace, Type...
                   ^
/var/mobile/kimk/theos/include/substrate.h:293:20: note: candidate function
      template not viable: requires 2 arguments, but 3 were provided
static inline void MSHookFunction(Type_ *symbol, Type_ *replace) {

 

  • Solution
Posted

lol..  do that..

 

static int Cash(void *self) {
    if(GetPrefBool(@"key1"))
    {
        return orig_Cash(self);
    }
    else
    {
        return 987654321;
    }
}

static bool Cheat(void *self) {
    if(GetPrefBool(@"key2"))
    {
        return orig_Cheat(self);
    }
    else
    {
        return FALSE;
    }
}
Posted
18 minutes ago, cz1993 said:

lol..  do that..

 


static int Cash(void *self) {
    if(GetPrefBool(@"key1"))
    {
        return orig_Cash(self);
    }
    else
    {
        return 987654321;
    }
}

static bool Cheat(void *self) {
    if(GetPrefBool(@"key2"))
    {
        return orig_Cheat(self);
    }
    else
    {
        return FALSE;
    }
}

hero <3 works, I love you!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Metal Slug Rush v1.0.0 [ +9 Cheats ] Currency Max
      Modded/Hacked App: Metal Slug Rush By REVIVECONTENTS CO.,LTD.
      Bundle ID: com.ringgames.msm
      App Store Link: https://apps.apple.com/us/app/metal-slug-rush/id6775727338?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
      • 1 reply
    • Metal Slug Rush v1.0.0 [ +9 jailed ] Currency Max
      Modded/Hacked App: Metal Slug Rush By REVIVECONTENTS CO.,LTD.
      Bundle ID: com.ringgames.msm
      App Store Link: https://apps.apple.com/us/app/metal-slug-rush/id6775727338?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
      • 0 replies
    • Pixel Mage: Idle RPG +10 Mods [ Unlimited Currencies ]
      Mod APK Game Name: Pixel Mage: Idle RPG By StreetComplete
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.streetcomplete.pixelmagician

       

      🤩 Hack Features

      - Damage Multiplier
      - Attack/Move Speed Multiplier
      - Freeze Gold
      - Unlimited Gold -> Will increase instead of decrease.
      - Freeze Blue Diamonds
      - Unlimited Blue Diamonds -> Will increase instead of decrease.
      - Freeze Red Diamonds
      - Unlimited Red Diamonds -> Will increase instead of decrease.
      - Freeze Purple Diamonds
      - Unlimited Purple Diamonds -> Will increase instead of decrease.
      • 0 replies
    • Pixel Mage: Idle RPG +10 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Pixel Mage: Idle RPG By YONGJIN JO
      Bundle ID: com.streetcomplete.pixelmagician
      App Store Link: https://apps.apple.com/us/app/pixel-mage-idle-rpg/id6741889270?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Attack/Move Speed Multiplier
      - Freeze Gold
      - Unlimited Gold -> Will increase instead of decrease.
      - Freeze Blue Diamonds
      - Unlimited Blue Diamonds -> Will increase instead of decrease.
      - Freeze Red Diamonds
      - Unlimited Red Diamonds -> Will increase instead of decrease.
      - Freeze Purple Diamonds
      - Unlimited Purple Diamonds -> Will increase instead of decrease.
      • 5 replies
    • Toy Brawlers: Arena Fight +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Toy Brawlers: Arena Fight By Studıo Gamebıt Yazılım Ve Teknoloji Ltd. Şti.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.studiogamebit.toybrawlers

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Bullet Boy v41 [ +1 Cheats ] Gems Max
      Modded/Hacked App: Bullet Boy By Outbox SRL
      Bundle ID: com.pomelogames.BulletBoy
      App Store Link: https://apps.apple.com/us/app/bullet-boy/id899606169?uo=4

      🤩 Hack Features

      - Gems Max
      • 0 replies
    • Bullet Boy v41 [ +1 Jailed ] Gems Max
      Modded/Hacked App: Bullet Boy By Outbox SRL
      Bundle ID: com.pomelogames.BulletBoy
      App Store Link: https://apps.apple.com/us/app/bullet-boy/id899606169?uo=4

      🤩 Hack Features

      - Gems Max
      • 2 replies
    • AmaZeus: Merge & Shoot v1.4.37 [ +6 Jailed ] ATK MAX
      Modded/Hacked App: AmaZeus: Merge & Shoot By Geisha Tokyo Inc.
      Bundle ID: com.merge.shooter
      App Store Link: https://apps.apple.com/us/app/amazeus-merge-shoot/id6742771024?uo=4

      🤩 Hack Features

      - Energy Max
      - Always Last Wave
      - AKF Rewards
      Hero Stats
      - HP Freeze
      - ATK MAX
      Enemy Stats
      - ATK 0
      • 2 replies
    • AmaZeus: Merge & Shoot v1.4.37 [ +6 Cheats ] ATK MAX
      Modded/Hacked App: AmaZeus: Merge & Shoot By Geisha Tokyo Inc.
      Bundle ID: com.merge.shooter
      App Store Link: https://apps.apple.com/us/app/amazeus-merge-shoot/id6742771024?uo=4
      🤩 Hack Features

      - Energy Max
      - Always Last Wave
      - AKF Rewards
      Hero Stats
      - HP Freeze
      - ATK MAX
      Enemy Stats
      - ATK 0
      • 3 replies
    • Mini DAYZ 2 +4 Jailed Cheats [ ESP Boxes, Lines ]
      Modded/Hacked App: Mini DAYZ 2 By Bohemia Interactive AS
      Bundle ID: com.bistudio.minidayz2
      App Store Link: https://apps.apple.com/us/app/mini-dayz-2/id1482111801?uo=4

       


      🤩 Hack Features

      - Ally ESP Boxes
      - Ally ESP Lines
      - Ally ESP Health
      - Ally ESP Distance
      - Enemy ESP Boxes
      - Enemy ESP Lines
      - Enemy ESP Health
      - Enemy ESP Distance
      • 7 replies
    • Haikyuu!! ( ハイキュー!! ) TOUCH AND CONNECT +4 Mods [ Auto Win ]
      Mod APK Game Name: ハイキュー!! TOUCH AND CONNECT By G Holdings co., ltd.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.gholdings.haicone

       

      🤩 Hack Features

      - Unlimited Score
      - Freeze Moves
      - Freeze In-Game Timer
      - Auto Win
      • 0 replies
    • Haikyuu!! ( ハイキュー!! ) TOUCH AND CONNECT +4 Jailed Cheats [ Auto Win ]
      Modded/Hacked App: ハイキュー!! TOUCH AND CONNECT By G HOLDINGS CO., LTD.
      Bundle ID: com.gholdings.haicone
      App Store Link: https://apps.apple.com/jp/app/%E3%83%8F%E3%82%A4%E3%82%AD%E3%83%A5%E3%83%BC-touch-and-connect/id6755984289?uo=4

       

      🤩 Hack Features

      - Unlimited Score
      - Freeze Moves
      - Freeze In-Game Timer
      - Auto Win
      • 1 reply
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines