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

    • Family Island — Farm game v2025148.1.76088 Jailed Cheats +1
      Modded/Hacked App: Family Island™ — Farm game by Melsoft
      Bundle ID: com.MelsoftGames.FamilyIsland
      iTunes Store Link: https://apps.apple.com/us/app/family-island-farm-game/id1464689103?uo=4&at=1010lce4


      Hack Features:
      - Cheat Engine Enabled


      iOS Hack Download Link: https://iosgods.com/topic/115337-arm64-family-island-%E2%80%94-farm-game-v20190824862-jailed-cheats-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,312 replies
    • Eternium Cheats v1.38.22 +11
      Modded/Hacked App: Eternium By Making Fun, Inc.
      Bundle ID: com.makingfun.mageandminions
      iTunes Store Link: https://apps.apple.com/us/app/eternium/id579931356?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - 5K Gems When Completed Stage
      - Infinite Gold
      - Infinite Cosmetic
      - Infinite Yellow Stone
      - Multiply Attack (Linked with Enemy)
      - No Skills Cooldown
      - No Consumable Cooldown
      - Multiply Attack Speed
      - Instant Regen Health
      - Always Crit
      - Material Drops (When you killed an Enemy it will drop materials for crafts)



      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/194526-eternium-cheats-v13355-6/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 85 replies
    • Bloody Bastards Cheats v4.2.2 +2
      Modded/Hacked App: Bloody Bastards By Tibith Ltd
      Bundle ID: com.tibith.badboxing2
      iTunes Store Link: https://apps.apple.com/us/app/bloody-bastards/id1593430099?uo=4


      Hack Features:
      - Infinite Coins
      - Dumb Enemy (Single Player)


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/158327-bloody-bastards-v315-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/158325-bloody-bastards-cheats-v315-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 159 replies
    • Westland Survival - Cowboy RPG v10.0 +7 [ Items Cheat ]
      Modded/Hacked App: Westland Survival - Cowboy RPG By HELIO LTD
      Bundle ID: com.heliogames.a1
      iTunes Store Link: https://apps.apple.com/us/app/westland-survival-cowboy-rpg/id1339238576?uo=4


      Hack Features:
      - Unlimited Energy / Instant Energy Refills
      - Unlock All Blueprints
      - Items Duplicate When Split / Items Hack
      - Unlimited Consumable Items
      - Unlimited Item Durability
      - God Mode / Never Die -> Linked with enemies. Useful for looting.
      - One Hit Kill / High Damage -> Linked with enemies. Use with caution.


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 421 replies
    • Grand Mountain Adventure 2 v1.0405 Jailed Cheats +1
      Modded/Hacked App: Grand Mountain Adventure 2 By Toppluva AB
      Bundle ID: com.toppluva.grandmountain2
      iTunes Store Link: https://apps.apple.com/us/app/grand-mountain-adventure-2/id6475040075?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Free iAP (Press cancel when Buy) -- Turn on cheat option inside iOSGods Menu first

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/192158-grand-mountain-adventure-2-v1018-jailed-cheats-1/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 53 replies
    • Jurassic World Alive v3.14.66 - [ Dino Don't Move & More ]
      Modded/Hacked App: Jurassic World Alive By Ludia
      Bundle ID: com.ludia.jw2
      iTunes Store Link: https://apps.apple.com/us/app/jurassic-world-alive/id1231085864


      Hack Features:
      - Dino Don't Move
      - Inf. Battery
      - VIP Enabled

      This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app. This hack works on the latest x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,692 replies
    • Car Match - Traffic Puzzle v2.61 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Car Match - Traffic Puzzle By GRAND GAMES OYUN VE YAZILIM ANONIM SIRKETI
      Bundle ID: com.grandgames.carmatch
      App Store Link: https://apps.apple.com/us/app/car-match-traffic-puzzle/id6504421808?uo=4

       
       

      🤩 Hack Features

      - Freeze Currencies
      - Unlimited Currencies -> Will increase instead of decrease.
      - Auto Win -> Quit the level.
      - Level Modifier
        • Thanks
      • 1 reply
    • Car Match - Traffic Puzzle v2.61 +4 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Car Match - Traffic Puzzle By GRAND GAMES OYUN VE YAZILIM ANONIM SIRKETI
      Bundle ID: com.grandgames.carmatch
      App Store Link: https://apps.apple.com/us/app/car-match-traffic-puzzle/id6504421808?uo=4

       
       

      🤩 Hack Features

      - Freeze Currencies
      - Unlimited Currencies -> Will increase instead of decrease.
      - Auto Win -> Quit the level.
      - Level Modifier
        • Like
      • 0 replies
    • Last War:Survival v1.0.300 [+1 Jailed Cheats]
      Modded/Hacked App: Last War:Survival By FUNFLY PTE. LTD.
      Bundle ID: com.lastwar.ios
      App Store Link: https://apps.apple.com/us/app/last-war-survival/id6448786147?uo=4



      Important


      Only work on Pve contents

      Enable on loading screen!

       

      🤩 Hack Features

      - Never Die
       
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 17 replies
    • Last War:Survival v1.0.300 [+1 Cheats]
      Modded/Hacked App: Last War:Survival By FUNFLY PTE. LTD.
      Bundle ID: com.lastwar.ios
      App Store Link: https://apps.apple.com/us/app/last-war-survival/id6448786147?uo=4



      Important


      Only work on Pve contents

      Enable on loading screen!

       

       

      🤩 Hack Features

      - Never Die
       
        • Agree
        • Thanks
        • Winner
        • Like
      • 23 replies
    • Dawn of Ages: Medieval Games v2.0.7 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
        • Agree
        • Winner
        • Like
      • 8 replies
    • Disney Speedstorm v1.13.0 +1 Jailed Cheat [ Unlimited Nitro ]
      Modded/Hacked App: Disney Speedstorm By Gameloft
      Bundle ID: com.gameloft.disneyspeedstorm
      iTunes Store Link: https://apps.apple.com/us/app/disney-speedstorm/id6449708682?uo=4


      Hack Features:
      - Unlimited Nitro -> Will not decrease.
      - Instant Nitro Max


      Jailbreak required hack(s): [Mod Menu Hack] Disney Speedstorm v1.5.0 +2 Cheats [ Unlimited Nitro ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 85 replies
×
  • 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