mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 15:17:23 +08:00
parent
4a0027a569
commit
54aecb0586
@ -2,6 +2,7 @@
|
|||||||
#include "natives.hpp"
|
#include "natives.hpp"
|
||||||
#include "gta/enums.hpp"
|
#include "gta/enums.hpp"
|
||||||
#include "util/math.hpp"
|
#include "util/math.hpp"
|
||||||
|
#include "gui.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
@ -9,7 +10,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (g->weapons.rapid_fire)
|
if (g->weapons.rapid_fire)
|
||||||
{
|
{
|
||||||
if(!HUD::IS_PAUSE_MENU_ACTIVE())
|
if(!HUD::IS_PAUSE_MENU_ACTIVE() && !g_gui.m_opened && !PED::IS_PED_DEAD_OR_DYING(self::ped, true))
|
||||||
{
|
{
|
||||||
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_ATTACK))
|
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_ATTACK))
|
||||||
{
|
{
|
||||||
|
@ -65,6 +65,7 @@ namespace big
|
|||||||
|
|
||||||
detour_hook_helper::add<hooks::invalid_mods_crash_detour>("IMCD", g_pointers->m_invalid_mods_crash_detour);
|
detour_hook_helper::add<hooks::invalid_mods_crash_detour>("IMCD", g_pointers->m_invalid_mods_crash_detour);
|
||||||
detour_hook_helper::add<hooks::constraint_attachment_crash>("CAC", g_pointers->m_constraint_attachment_crash);
|
detour_hook_helper::add<hooks::constraint_attachment_crash>("CAC", g_pointers->m_constraint_attachment_crash);
|
||||||
|
detour_hook_helper::add<hooks::crash_bdsm>("CBDSM", g_pointers->m_crash_bdsm);
|
||||||
|
|
||||||
detour_hook_helper::add<hooks::update_presence_attribute_int>("UPAI", g_pointers->m_update_presence_attribute_int);
|
detour_hook_helper::add<hooks::update_presence_attribute_int>("UPAI", g_pointers->m_update_presence_attribute_int);
|
||||||
detour_hook_helper::add<hooks::update_presence_attribute_string>("UPAS", g_pointers->m_update_presence_attribute_string);
|
detour_hook_helper::add<hooks::update_presence_attribute_string>("UPAS", g_pointers->m_update_presence_attribute_string);
|
||||||
|
@ -99,6 +99,7 @@ namespace big
|
|||||||
|
|
||||||
static void invalid_mods_crash_detour(int64_t a1, int64_t a2, int a3, char a4);
|
static void invalid_mods_crash_detour(int64_t a1, int64_t a2, int a3, char a4);
|
||||||
static std::int64_t constraint_attachment_crash(std::uintptr_t a1);
|
static std::int64_t constraint_attachment_crash(std::uintptr_t a1);
|
||||||
|
static std::int64_t crash_bdsm(std::int64_t a1, std::int64_t a2, unsigned int a3, int a4, std::int64_t a5);
|
||||||
|
|
||||||
static bool update_presence_attribute_int(void* presence_data, int profile_index, char* attr, std::uint64_t value);
|
static bool update_presence_attribute_int(void* presence_data, int profile_index, char* attr, std::uint64_t value);
|
||||||
static bool update_presence_attribute_string(void* presence_data, int profile_index, char* attr, char* value);
|
static bool update_presence_attribute_string(void* presence_data, int profile_index, char* attr, char* value);
|
||||||
|
11
src/hooks/protections/crash_bdsm.cpp
Normal file
11
src/hooks/protections/crash_bdsm.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "hooking.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
std::int64_t hooks::crash_bdsm(std::int64_t a1, std::int64_t a2, unsigned int a3, int a4, std::int64_t a5)
|
||||||
|
{
|
||||||
|
if (a3 <= 0)
|
||||||
|
a3 = 1;
|
||||||
|
return g_hooking->get_original<hooks::crash_bdsm>()(a1, a2, a3, a4, a5);
|
||||||
|
}
|
||||||
|
}
|
@ -670,6 +670,11 @@ namespace big
|
|||||||
m_constraint_attachment_crash = ptr.as<PVOID>();
|
m_constraint_attachment_crash = ptr.as<PVOID>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
main_batch.add("CBDSM", "E8 ? ? ? ? 48 8B 47 10 4C 8B 8C 24", [this](memory::handle ptr)
|
||||||
|
{
|
||||||
|
m_crash_bdsm = ptr.add(1).rip().as<PVOID>();
|
||||||
|
});
|
||||||
|
|
||||||
auto mem_region = memory::module("GTA5.exe");
|
auto mem_region = memory::module("GTA5.exe");
|
||||||
main_batch.run(mem_region);
|
main_batch.run(mem_region);
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ namespace big
|
|||||||
|
|
||||||
PVOID m_invalid_mods_crash_detour{};
|
PVOID m_invalid_mods_crash_detour{};
|
||||||
PVOID m_constraint_attachment_crash{};
|
PVOID m_constraint_attachment_crash{};
|
||||||
|
PVOID m_crash_bdsm{};
|
||||||
|
|
||||||
int64_t** m_send_chat_ptr{};
|
int64_t** m_send_chat_ptr{};
|
||||||
functions::send_chat_message m_send_chat_message{};
|
functions::send_chat_message m_send_chat_message{};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user