Jump to content

How To Make Enable Switch in preferences


Go to solution Solved by castix,

7 posts in this topic

Recommended Posts

Posted

Hello ,

 

in dida THEOS template

 

 

we can do siwtch for every funciton

%hook something
 
-(int)method {
if(GetPrefBool(@"kKey")) {
return 9999999;
}
return %orig;
}

-(int)gems {       
if(GetPrefBool(@"kGems")) {
return 9999999;
}
return %orig;
}

-(unsigned int)lives {
if(GetPrefBool(@"kLives")) {
return 9999999;
}
return %orig;
}

%end

%hook SomethingElse

-(BOOL)SomeMethod {
if(GetPrefBool(@"kKEY5")) {
return TRUE;
}
return %orig;
}

-(BOOL)SomeMethod2 {
if(GetPrefBool(@"kKEY6")) {
return FALSE;
}
return %orig;
}

%end

We have 6 funciton with 6 switcher

 

but i want make 1 switcher for 6 funciton

 

Enable/Disable

 

something like this

 

If All funciton ok

enable the tweak

 

 

else

disable

 

 

Thank U :)

 

 

Posted (edited)


%hook something

- (int)method {

if(GetPrefBool(@"enable")) {

return 9999999;

}

return %orig;

}

 

- (int)gems {

if(GetPrefBool(@"enable")) {

return 9999999;

}

return %orig;

}

 

- (unsigned int)lives {

if(GetPrefBool(@"enable")) {

return 9999999;

}

return %orig;

}

%end

 

%hook SomethingElse

- (BOOL)SomeMethod {

if(GetPrefBool(@"enable")) {

return true;

}

return %orig;

}

 

- (BOOL)SomeMethod2 {

if(GetPrefBool(@"enable")) {

return false;

}

return %orig;

}

%end


<dict>

    <key>cell</key>

    <string>PSGroupCell</string>

    <key>key</key>

    <string>enable</string>

    <key>defaults</key>

    <string>sampletext</string>

    <key>default</key>

    </false>

    <key>label</key>

    <string>sampletext</string>

    <key>icon</key>

    <string>icon.png</string>

</dict>

 

Updated by z0ne
Posted
%hook something
- (int)method {
    if(GetPrefBool(@"enable")) {
    return 9999999;
    }
    return %orig;
}

- (int)gems { 
    if(GetPrefBool(@"enable")) {
    return 9999999;
    }
    return %orig;
}

- (unsigned int)lives {
    if(GetPrefBool(@"enable")) {
    return 9999999;
    }
    return %orig;
}
%end

%hook SomethingElse
- (BOOL)SomeMethod {
    if(GetPrefBool(@"enable")) {
    return true;
    }
    return %orig;
}

- (BOOL)SomeMethod2 {
    if(GetPrefBool(@"enable")) {
    return false;
    }
    return %orig;
}
%end
<dict>
    <key>cell</key>
    <string>PSGroupCell</string>
    <key>key</key>
    <string>enable</string>
    <key>defaults</key>
    <string>sampletext</string>
    <key>default</key>
    </false>
    <key>label</key>
    <string>sampletext</string>
    <key>icon</key>
    <string>icon.png</string>
</dict>

 

 

Thank you for replay

 

 

I have problem when save plist file

 

vaule missing for key inside <dict> at line 16 .

 

my plist file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>items</key>
	<array>
	
	<dict>
    <key>cell</key>
    <string>PSGroupCell</string>
    <key>key</key>
    <string>enable</string>
    <key>defaults</key>
    <string>Disable</string>
    <key>default</key>
    </false>
    <key>label</key>
    <string>Enable</string>
    <key>icon</key>
    <string>icon.png</string>
</dict>
			<dict>
			<key>cell</key>
			<string>PSTextCell</string>
			<key>label</key>
			<string>Made by Yazeed Alotaibi.</string>
		</dict>
		<dict>
			<key>action</key>
			<string>link</string>
			<key>cell</key>
			<string>PSButtonCell</string>
			<key>icon</key>
			<string>[email protected]</string>
			<key>label</key>
			<string>Visit ZezBlog.com</string>
		</dict>
	</array>
	<key>title</key>
	<string>PlayYTinBG</string>
</dict>
</plist>

  • Solution
Posted

What's the plist name because

<key>defaults</key>
<string>Disable</string>
<key>default</key>
</false>
<key>label</key>
<string>Enable</string>
<key>icon</key>
<string>icon.png</string>
</dict>

you edited this part wrong

Posted

What's the plist name because

<key>defaults</key>
<string>Disable</string>
<key>default</key>
</false>
<key>label</key>
<string>Enable</string>
<key>icon</key>
<string>icon.png</string>
</dict>

you edited this part wrong

 

plist name PlayYTinBG.plist

 

 

package name : com.zezblog.playytinbg

Posted

Sloved

        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <false/>
            <key>defaults</key>
            <string>com.zezblog.playytinbg</string>
            <key>key</key>
            <string>enable</string>
            <key>label</key>
            <string>enable</string>
        </dict>

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

    • Shoot & Hide v1.5.3 [ +6 Cheats ] Currency Max
      Modded/Hacked App: Shoot & Hide By CRAZY LABS BY TABTALE , G.P.
      Bundle ID: com.sniper.shoot.hide.game
      App Store Link: https://apps.apple.com/us/app/shoot-hide/id6747033069?uo=4

      🤩 Hack Features

      Pre Activated
      - Currency Max / Earn Then Get
      - Trophies Max Earn Then Get
      - Heroes Unlocked / Linked Trophies
      - Location Unlocked / Linked Trophies
      - Merge Anything
      - HP MAX / ON When Enemy Turn After Disable
        • Like
      • 2 replies
    • Shoot & Hide v1.5.3 [ +6 Jailed ] Currency Max
      Modded/Hacked App: Shoot & Hide By CRAZY LABS BY TABTALE , G.P.
      Bundle ID: com.sniper.shoot.hide.game
      App Store Link: https://apps.apple.com/us/app/shoot-hide/id6747033069?uo=4

      🤩 Hack Features

      Pre Activated
      - Currency Max / Earn Then Get
      - Trophies Max Earn Then Get
      - Heroes Unlocked / Linked Trophies
      - Location Unlocked / Linked Trophies
      - Merge Anything
      - HP MAX / ON When Enemy Turn After Disable
      • 1 reply
    • Real War: Survival Game v0.1.4 [ +4 APK MOD ] Troops Max
      Mod APK Game Name: Real War: Survival Game
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.zc.action.war.survival.game

      🤩 Hack Features

      - Auto ADS NO
      - Upgrade Cost 0 / Easy To Get Coins - ATK - Fire Rate
      ::::::: VIP :::::::
      - Unlimited Troops / Hit Damage Then Use It / Just Hit 🟢🔴 Then Work
      - Max ATK
        • Informative
        • Agree
        • Winner
      • 2 replies
    • Real War: Survival Game v1.1.0 [ +4 Cheats ] Troops Max
      Modded/Hacked App: Real War: Survival Game By Rameez Rehmat
      Bundle ID: com.sku.action.war.survival.games
      App Store Link: https://apps.apple.com/us/app/real-war-survival-game/id6772532581?uo=4

      🤩 Hack Features

      - Auto ADS NO
      - Upgrade Cost 0 / Easy To Get Coins - ATK - Fire Rate
      ::::::: VIP :::::::
      - Unlimited Troops / Hit Damage Then Use It / Just Hit 🟢🔴 Then Work
      - Custom ATK 
        • Like
      • 1 reply
    • Real War: Survival Game v1.1.0 [ +4 Jailed ] Troops Max
      Modded/Hacked App: Real War: Survival Game By Rameez Rehmat
      Bundle ID: com.sku.action.war.survival.games
      App Store Link: https://apps.apple.com/us/app/real-war-survival-game/id6772532581?uo=4

      🤩 Hack Features

      - Auto ADS NO
      - Upgrade Cost 0 / Easy To Get Coins - ATK - Fire Rate
      ::::::: VIP :::::::
      - Unlimited Troops / Hit Damage Then Use It / Just Hit 🟢🔴 Then Work
      - Custom ATK 
        • Agree
        • Like
      • 0 replies
    • DRAGON BALL Z DOKKAN BATTLE Japan (ドラゴンボールZ ドッカンバトル) v6.2.5 +7 Cheats!
      Modded/Hacked App: ドラゴンボールZ ドッカンバトル By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0211
      iTunes Link: https://itunes.apple.com/jp/app/ドラゴンボールz-ドッカンバトル/id951627670


      Hack Features
      - Unlimited HP  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Damage  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Defense  -  (Put .0 at the back of your value: 1000.0)
      - Dice Hack -  [ONLY RANGE BETWEEN 1 - 6 or it will crash]  -  (Put .0 at the back of your value: 4.0)
      - Dice Hack 1, 2, 3
      - Dice Hack 4, 5, 6
      - Auto Win Battles -> Disable if you get errors.
      PUT .0 at the back of all values!
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 8,073 replies
    • Mushroom War: Evolution TD v1.16.2 [ +8 APK MOD ] Currency Max
      Mod APK Game Name: Mushroom War: Evolution TD
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=rollingball.td.mushroom.warriors&hl=en

      🤩 Hack Features

      - ADS Skip Ticket Max / Rewards Free
      - Battle Food Speed
      ::::::: VIP :::::::
      - AI Freeze
      - Unlimited Gems
      - Unlimited Coins
      - Base HP MAX
      - Base HP Freeze
      - Hero HP Freeze
        • Like
      • 1 reply
    • Mushroom War: Evolution TD v1.2.0 [ +8 Cheats ] Currency Max
      Modded/Hacked App: Mushroom War: Evolution TD By Hangzhou Rolling Technology Co., Ltd.
      Bundle ID: com.snowball.td.mushroom
      App Store Link: https://apps.apple.com/us/app/mushroom-war-evolution-td/id6761058966?uo=4

      🤩 Hack Features

      - ADS Skip Ticket Max / Rewards Free
      - Battle Food
      ::::::: VIP :::::::
      - AI Freeze
      - Unlimited Gems
      - Unlimited Coins
      - Base HP MAX
      - Base HP Freeze
      - Hero HP Freeze
        • Like
      • 2 replies
    • Mushroom War: Evolution TD v1.2.0 [ +8 Jailed ] Currency Max
      Modded/Hacked App: Mushroom War: Evolution TD By Hangzhou Rolling Technology Co., Ltd.
      Bundle ID: com.snowball.td.mushroom
      App Store Link: https://apps.apple.com/us/app/mushroom-war-evolution-td/id6761058966?uo=4

      🤩 Hack Features

      - ADS Skip Ticket Max / Rewards Free
      - Battle Food
      ::::::: VIP :::::::
      - AI Freeze
      - Unlimited Gems
      - Unlimited Coins
      - Base HP MAX
      - Base HP Freeze
      - Hero HP Freeze
        • Like
      • 1 reply
    • Skull Hero : XP Farm RPG v0.0.1.6 [ +3 APK MOD ] ATK MAX
      Mod APK Game Name: Skull Hero : XP Farm RPG
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.horus.hero.xp.farm.rpg&hl=en

      🤩 Hack Features

      - ViP Active
      - Enough Gems
      - ATK MAX
      • 0 replies
    • Skull Hero : XP Farm RPG v0.1.0 [ +3 Cheats ] ATK MAX
      Modded/Hacked App: Skull Hero : XP Farm RPG By HORUS ENTERTAINMENT LIMITED
      Bundle ID: com.horusent.hero.xp.farm.rpg
      App Store Link: https://apps.apple.com/us/app/skull-hero-xp-farm-rpg/id6775685404?uo=4

      🤩 Hack Features

      - ViP Active
      - Enough Gems
      - ATK MAX
        • Like
      • 1 reply
    • Skull Hero : XP Farm RPG v0.1.0 [ +3 Jailed ] ATK MAX
      Modded/Hacked App: Skull Hero : XP Farm RPG By HORUS ENTERTAINMENT LIMITED
      Bundle ID: com.horusent.hero.xp.farm.rpg
      App Store Link: https://apps.apple.com/us/app/skull-hero-xp-farm-rpg/id6775685404?uo=4

      🤩 Hack Features

      - ViP Active
      - Enough Gems
      - ATK MAX
        • Informative
        • Agree
        • Thanks
      • 0 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