diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 210fd7ec..1f9b5542 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -309,6 +309,7 @@ namespace big bool no_recoil = false; bool no_spread = false; char vehicle_gun_model[12] = "bus"; + bool bypass_c4_limit = false; }; struct window @@ -637,6 +638,7 @@ namespace big this->weapons.infinite_mag = j["weapons"]["infinite_mag"]; this->weapons.no_recoil = j["weapons"]["no_recoil"]; this->weapons.no_spread = j["weapons"]["no_spread"]; + this->weapons.bypass_c4_limit = j["weapons"]["bypass_c4_limit"]; this->weapons.ammo_special.type = (eAmmoSpecialType)j["weapons"]["ammo_special"]["type"]; this->weapons.ammo_special.toggle = j["weapons"]["ammo_special"]["toggle"]; @@ -945,7 +947,8 @@ namespace big { "infinite_ammo", this->weapons.infinite_ammo }, { "infinite_mag", this->weapons.infinite_mag }, { "no_recoil", this->weapons.no_recoil }, - { "no_spread", this->weapons.no_spread } + { "no_spread", this->weapons.no_spread }, + { "bypass_c4_limit", this->weapons.bypass_c4_limit } } }, { diff --git a/BigBaseV2/src/pointers.cpp b/BigBaseV2/src/pointers.cpp index 77a9d005..013dfa3e 100644 --- a/BigBaseV2/src/pointers.cpp +++ b/BigBaseV2/src/pointers.cpp @@ -419,6 +419,20 @@ namespace big auto mem_region = memory::module(nullptr); main_batch.run(mem_region); + if (auto pat = mem_region.scan("41 80 78 28 ? 0F 85 F5 01 00 00")) + { + m_bypass_max_count_of_active_sticky_bombs = pat.add(4).as(); + + // declare it right now even though we write the same value + // so that it get cleaned up in the dctor + memory::byte_patch::make(m_bypass_max_count_of_active_sticky_bombs, *m_bypass_max_count_of_active_sticky_bombs); + + if (g->weapons.bypass_c4_limit) + { + *m_bypass_max_count_of_active_sticky_bombs = 99; + } + } + /** * Freemode thread restorer through VM patch */ diff --git a/BigBaseV2/src/pointers.hpp b/BigBaseV2/src/pointers.hpp index c6d8f0b8..5c3b7d1a 100644 --- a/BigBaseV2/src/pointers.hpp +++ b/BigBaseV2/src/pointers.hpp @@ -110,6 +110,8 @@ namespace big functions::start_get_session_by_gamer_handle m_start_get_session_by_gamer_handle; functions::join_session_by_info m_join_session_by_info; + uint8_t* m_bypass_max_count_of_active_sticky_bombs; + functions::reset_network_complaints m_reset_network_complaints{}; functions::fidevice_get_device m_fidevice_get_device{}; diff --git a/BigBaseV2/src/views/self/view_weapons.cpp b/BigBaseV2/src/views/self/view_weapons.cpp index 956882ca..bce75038 100644 --- a/BigBaseV2/src/views/self/view_weapons.cpp +++ b/BigBaseV2/src/views/self/view_weapons.cpp @@ -6,6 +6,7 @@ #include "services/gta_data/gta_data_service.hpp" #include "gta/joaat.hpp" #include "views/view.hpp" +#include "pointers.hpp" namespace big { @@ -19,6 +20,11 @@ namespace big ImGui::Checkbox("Enable Special Ammo", &g->weapons.ammo_special.toggle); + if (ImGui::Checkbox("Bypass C4 Limit", &g->weapons.bypass_c4_limit)) + { + *g_pointers->m_bypass_max_count_of_active_sticky_bombs = g->weapons.bypass_c4_limit ? 99 : 4; + } + eAmmoSpecialType selected_ammo = g->weapons.ammo_special.type; eExplosionTag selected_explosion = g->weapons.ammo_special.explosion_tag;