Jump to content

2 posts in this topic

Recommended Posts

Posted

So i've been working on a mod menu for a couple days and I've tried working with instance variables but it just won't work, im trying to mod Pixel Gun 3D which is a Unity game and i've tested this on a jailbroken device

here is the HOOK function

uint64_t getOffset(uint64_t offset){
    return (long)_dyld_get_image_header(0) + offset;
}

#define HOOK(offset, ptr, orig) MSHookFunction((void *)getOffset(offset), (void *)ptr, (void **)&orig)

i also made sure i defined all the variables

int selectedBullet = 0;
bool shootBullet = false;

and here is the code for the hook

void(*oldWeaponSounds)(void* obj);
void WeaponSounds(void* obj){
    if(obj != nullptr){
        if (silentaim) {
            *(bool*)((uint64_t) obj + 0x191) = true; // isRoundMelee
            *(float*)((uint64_t) obj + 0x184) = 9999.0f; // radiusRoundMelee
        }


        if (shootBullet) {
            if (selectedBullet == 0) {
                *(bool*)((uint64_t) obj + 0x12B) = true; // bazooka
            } else if (selectedBullet == 1) { // laser
                *(bool*)((uint64_t) obj + 0x1BC) = true; // railgun
            } else if (selectedBullet == 2) { // shotgun
                *(bool*)((uint64_t) obj + 0x1A6) = true; // isShotgun
            } else if (selectedBullet == 3) { // harpoon
                *(bool*)((uint64_t) obj + 0x2A4) = true; // harpoon
            } else if (selectedBullet == 4) { // dash
                *(bool*)((uint64_t) obj + 0x294) = true; // isDash
            } else if (selectedBullet == 5) { // exploding bullets
                *(bool*)((uint64_t) obj + 0x1A5) = true; // bulletExplode
            }
        }
    oldWeaponSounds(obj);
    }
}

void Hooks() {
    HOOK(0x2DC1EB0, WeaponSounds, oldWeaponSounds);
}

the first parameter of the HOOK function is the Update function for the WeaponSounds class

	[FieldOffset(Offset = "0x191")]
	public bool isRoundMelee;
	[FieldOffset(Offset = "0x184")]
	public float radiusRoundMelee;

	[丌丈专三丌丞丈东丏("Bazooka")]
	public bool bazooka;
and so on
[Address(RVA = "0x2DC1EB0", Offset = "0x2DC1EB0", VA = "0x2DC1EB0")]
private void Update()
{
}

then I call the Hooks function at where the ImGui menu is drawn 

- (void)draw

{
    [self drawMenu];
    Hooks();
    [self nono];
    [self nosee];
}

and heres the code for the switch:

        if (ImGui::BeginTabItem(ENCRYPT("Gameplay"))) {
            const char* bulletTypes[] = { "Rocket", "Laser", "Shotgun", "Harpoon", "Dash", "Exploding Bullets"};

            ImGui::Text(ENCRYPT("Gameplay Mods"));

            ImGui::Checkbox("Silent Aim", &silentaim);

            ImGui::Checkbox("Shoot bullet: ", &shootBullet); ImGui::SameLine();
            if (ImGui::Combo(" ", &selectedBullet, bulletTypes, IM_ARRAYSIZE(bulletTypes))) {
                char buffer[512];
                snprintf(buffer, 512, "Index: %d\nSelected item: %s", selectedBullet, bulletTypes[selectedBullet]);
                showAlert("Info", buffer);
            }

            if (shootBullet && !shootBulletAlertShown) {
                char buffer[512];
                snprintf(buffer, 512, "Index: %d\nSelected item: %s", selectedBullet, bulletTypes[selectedBullet]);
                showAlert("Info", buffer);
                shootBulletAlertShown = true;
            }
            if (!shootBullet && shootBulletAlertShown) {
                shootBulletAlertShown = false;
            }

            ImGui::EndTabItem();
        }

Im 101% sure the offset to the update function is correct as i double checked multiple times and when the checkbox is ticked, nothing happens

IMG_9905.png

i also made sure the instance variables are correct and double checked multiple times, im not sure what i did wrong and would appreciate it if anyone knows whats going on with the code and please let me know in the replies if you need any more details the mod im working on is in objective c++ and uses the dear imgui from ocornut

  • Like 2

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

    • Sport Star - Team Manager Idle v0.10.0 [ +4 APK MOD ] Currency Max
      Mod APK Game Name: Sport Star - Team Manager Idle
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.coolcatsgames.sportstaridle&hl=en

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Currency Freeze
      - Gems Max
      - Cash Increaser
      • 0 replies
    • Sport Star - Team Manager Idle v0.10.0 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Sport Star - Team Manager Idle By Gryphon Games UG (haftungsbeschrankt)
      Bundle ID: com.coolcatsgames.sportstaridle
      App Store Link: https://apps.apple.com/us/app/sport-star-team-manager-idle/id6761053085?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Enough Currency
      - Currency Freeze
      - Gems Max
      - Cash Increaser
      • 0 replies
    • Sport Star - Team Manager Idle v0.10.0 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Sport Star - Team Manager Idle By Gryphon Games UG (haftungsbeschrankt)
      Bundle ID: com.coolcatsgames.sportstaridle
      App Store Link: https://apps.apple.com/us/app/sport-star-team-manager-idle/id6761053085?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Enough Currency
      - Currency Freeze
      - Gems Max
      - Cash Increaser
      • 0 replies
    • God Rivals: RPG Roguelike +8 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: God Rivals: RPG Roguelike By Gamee Joint Stock Company
      Bundle ID: com.gamee.godslayer.rpg.rougelike
      App Store Link: https://apps.apple.com/us/app/god-rivals-rpg-roguelike/id6747413590?uo=4

       

      🤩 Hack Features

      - God Mode
      - One-Hit Kill
      - Increased Attack Speed
      - No Skill Cooldown
      - Auto Win
      - Unlimited Currencies -> Will increase instead of decrease.
      - Unlock Premium Pass
      - Unlock Royal Pass
      • 2 replies
    • Dragon Barrage: Brick Breaker v1.1.6 [ +6 APK MOD ] Auto Win
      Modded/Hacked App: Dragon Barrage By Ryogo Oka
      Bundle ID: game01.hosistem.ne
      App Store Link: https://apps.apple.com/us/app/dragon-barrage/id6760708796?uo=4

      🤩 Hack Features

      - ATK MAX
      :::::: VIP ::::::
      - Auto ADS NO
      - Auto Win
      - Unlimited Gems / Sell Items Then Get
      - Unlimited Energy
      - Enemy Freeze
      • 0 replies
    • Dragon Barrage v1.1.6 [ +6 Cheats ] Auto Win
      Modded/Hacked App: Dragon Barrage By Ryogo Oka
      Bundle ID: game01.hosistem.ne
      App Store Link: https://apps.apple.com/us/app/dragon-barrage/id6760708796?uo=4

      🤩 Hack Features

      - ATK MAX
      :::::: VIP ::::::
      - Auto ADS NO
      - Auto Win
      - Unlimited Gems
      - Unlimited Energy
      - Enemy Freeze
      • 0 replies
    • Dragon Barrage v1.1.6 [ +6 Jailed ] Auto Win
      Modded/Hacked App: Dragon Barrage By Ryogo Oka
      Bundle ID: game01.hosistem.ne
      App Store Link: https://apps.apple.com/us/app/dragon-barrage/id6760708796?uo=4

      🤩 Hack Features

      - ATK MAX
      :::::: VIP ::::::
      - Auto ADS NO
      - Auto Win
      - Unlimited Gems
      - Unlimited Energy
      - Enemy Freeze
        • Like
      • 0 replies
    • Ghost Sniper: War FPS Shooter v1.0.1 [ +6 APK MOD ] Currency Max
      Mod APK Game Name: Ghost Sniper: War FPS Shooter
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=sniper.war.target.soldier.shooter.aldagames.com

      🤩 Hack Features

      - Auto ADS No
      - Unlimited Gold
      - Unlimited Cash
      - Unlimited Energy
      - Unlimited Stars
      - Ammo Freeze
        • Like
      • 1 reply
    • Ghost Sniper: War FPS Shooter v1.0.1 [ +6 Jailed ] Currency Max
      Modded/Hacked App: Ghost Sniper: War FPS Shooter By Alda Games, s.r.o.
      Bundle ID: sniper.war.target.soldier.shooter.aldagames.com
      App Store Link: https://apps.apple.com/us/app/ghost-sniper-war-fps-shooter/id6756882608?uo=4

      🤩 Hack Features

      - Auto ADS No
      - Unlimited Gold
      - Unlimited Cash
      - Unlimited Energy
      - Unlimited Stars
      - Ammo Freeze
      • 1 reply
    • Ghost Sniper: War FPS Shooter v1.0.1 [ +6 Cheats ] Currency Max
      Modded/Hacked App: Ghost Sniper: War FPS Shooter By Alda Games, s.r.o.
      Bundle ID: sniper.war.target.soldier.shooter.aldagames.com
      App Store Link: https://apps.apple.com/us/app/ghost-sniper-war-fps-shooter/id6756882608?uo=4

      🤩 Hack Features

      - Auto ADS No
      - Unlimited Gold
      - Unlimited Cash
      - Unlimited Energy
      - Unlimited Stars
      - Ammo Freeze
      • 0 replies
    • Swamp Attack 2 v1.2.2 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Swamp Attack 2 By Voodoo
      Bundle ID: com.hyperdotstudios.swampattack2
      iTunes Store Link: https://apps.apple.com/us/app/swamp-attack-2/id1531686083?uo=4


      Hack Features:
      - Gems
      - Gold
      - Ammo
      - Monster ATK No


      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
        • Thanks
        • Winner
        • Like
      • 55 replies
    • Swamp Attack 2 v1.2.2 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Swamp Attack 2 By Voodoo
      Bundle ID: com.hyperdotstudios.swampattack2
      iTunes Store Link: https://apps.apple.com/us/app/swamp-attack-2/id1531686083?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:

      - Gems

      - Gold
      - Ammo
      - Monster ATK No


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      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
      • 64 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