bypass c4 limit (#523)
This commit is contained in:
parent
dd6e9450fc
commit
815201f65c
@ -309,6 +309,7 @@ namespace big
|
|||||||
bool no_recoil = false;
|
bool no_recoil = false;
|
||||||
bool no_spread = false;
|
bool no_spread = false;
|
||||||
char vehicle_gun_model[12] = "bus";
|
char vehicle_gun_model[12] = "bus";
|
||||||
|
bool bypass_c4_limit = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct window
|
struct window
|
||||||
@ -637,6 +638,7 @@ namespace big
|
|||||||
this->weapons.infinite_mag = j["weapons"]["infinite_mag"];
|
this->weapons.infinite_mag = j["weapons"]["infinite_mag"];
|
||||||
this->weapons.no_recoil = j["weapons"]["no_recoil"];
|
this->weapons.no_recoil = j["weapons"]["no_recoil"];
|
||||||
this->weapons.no_spread = j["weapons"]["no_spread"];
|
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.type = (eAmmoSpecialType)j["weapons"]["ammo_special"]["type"];
|
||||||
this->weapons.ammo_special.toggle = j["weapons"]["ammo_special"]["toggle"];
|
this->weapons.ammo_special.toggle = j["weapons"]["ammo_special"]["toggle"];
|
||||||
@ -945,7 +947,8 @@ namespace big
|
|||||||
{ "infinite_ammo", this->weapons.infinite_ammo },
|
{ "infinite_ammo", this->weapons.infinite_ammo },
|
||||||
{ "infinite_mag", this->weapons.infinite_mag },
|
{ "infinite_mag", this->weapons.infinite_mag },
|
||||||
{ "no_recoil", this->weapons.no_recoil },
|
{ "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 }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -419,6 +419,20 @@ namespace big
|
|||||||
auto mem_region = memory::module(nullptr);
|
auto mem_region = memory::module(nullptr);
|
||||||
main_batch.run(mem_region);
|
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<uint8_t*>();
|
||||||
|
|
||||||
|
// 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
|
* Freemode thread restorer through VM patch
|
||||||
*/
|
*/
|
||||||
|
@ -110,6 +110,8 @@ namespace big
|
|||||||
functions::start_get_session_by_gamer_handle m_start_get_session_by_gamer_handle;
|
functions::start_get_session_by_gamer_handle m_start_get_session_by_gamer_handle;
|
||||||
functions::join_session_by_info m_join_session_by_info;
|
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::reset_network_complaints m_reset_network_complaints{};
|
||||||
|
|
||||||
functions::fidevice_get_device m_fidevice_get_device{};
|
functions::fidevice_get_device m_fidevice_get_device{};
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "services/gta_data/gta_data_service.hpp"
|
#include "services/gta_data/gta_data_service.hpp"
|
||||||
#include "gta/joaat.hpp"
|
#include "gta/joaat.hpp"
|
||||||
#include "views/view.hpp"
|
#include "views/view.hpp"
|
||||||
|
#include "pointers.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
@ -19,6 +20,11 @@ namespace big
|
|||||||
|
|
||||||
ImGui::Checkbox("Enable Special Ammo", &g->weapons.ammo_special.toggle);
|
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;
|
eAmmoSpecialType selected_ammo = g->weapons.ammo_special.type;
|
||||||
eExplosionTag selected_explosion = g->weapons.ammo_special.explosion_tag;
|
eExplosionTag selected_explosion = g->weapons.ammo_special.explosion_tag;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user