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 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
from iOSGods RSS Feed https://ift.tt/0VCH3cb
Subscribe to:
Post Comments (Atom)
-
Yubo Yoti bypass Requirements: Yubo app Jailbroken iPhone Apps Manager Brain Steps: Open Apps Manager Locate Yubo in Apps Manager and open i...
-
Modded/Hacked App: Simply Guitar by JoyTunes by JoyTunes Bundle ID: com.joytunes.SimplyGuitar iTunes Store Link: https://ift.tt/2ANDd7d Mod ...
-
I don't know how this happened, i was trying to install Kinemaster modded version on my iPhone 7 running iOS 14.0.1, maybe it's beca...
-
Hey everyone I am running Ipad 6th generation running ios 14.0 32 gb capacity with 19.1 gb left I used sideloadly yesterday to install an ap...
-
Hello! I am using this for practice using a dummy Snapchat account I've made and created a My Eyes Only tab. Now, if you don't know ...
-
Hello, does anyone know why I cannot use my Apple password or password from apple servers? Sideloadly version 0.16.1 Checking iOS version......
-
As the title says upon installing Last Day on Earth with sideloadly i get this error ERROR: Guru Meditation 6020bc@89:f11511 Call to np_clie...
-
Hello friends, So I have a problem with Sideloadly, I installed it on my (32x bit Windows 7) laptop (SONY) and tried opening it, but when I ...
-
Hello, I am currently running with an iPhone XR on IOS 12.2. I am trying to install ipa files through cydia impactor but keep receiving this...
-
Netflix is now offering users a chance to win a free subscription for 83 years. The company calls it the “immortal” Netflix account. T...
No comments:
Post a Comment