mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
feat(spoofing): Spoof godmode (#534)
Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
parent
e449e6885d
commit
a7fa050ca6
@ -221,6 +221,8 @@ namespace big
|
||||
|
||||
bool spoof_cheater = false;
|
||||
|
||||
bool spoof_hide_god = false;
|
||||
|
||||
bool spoof_rockstar_dev = false;
|
||||
bool spoof_rockstar_qa = false;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "datanodes/player/CPlayerGameStateDataNode.hpp"
|
||||
|
||||
namespace big::functions
|
||||
{
|
||||
@ -10,12 +11,14 @@ namespace big::functions
|
||||
|
||||
using trigger_script_event = void(*)(int event_group, int64_t* args, int arg_count, int player_bits);
|
||||
|
||||
|
||||
using increment_stat_event = bool(*)(uint64_t net_event_struct, int64_t sender, int64_t a3);
|
||||
|
||||
using ptr_to_handle = Entity(*)(void* entity);
|
||||
using get_script_handle_t = uint64_t(*)(int64_t);
|
||||
|
||||
using multiplayer_chat_filter = int(__int64 chat_type, const char* input, const char** output);
|
||||
using write_player_game_state_data_node = bool(*)(rage::netObject* plr, CPlayerGameStateDataNode* node);
|
||||
|
||||
using get_gameplay_cam_coords = Vector3(*)();
|
||||
|
||||
|
@ -29,6 +29,9 @@ namespace big
|
||||
// Multiplayer chat filter
|
||||
m_multiplayer_chat_filter("MCF", g_pointers->m_multiplayer_chat_filter, &hooks::multiplayer_chat_filter),
|
||||
|
||||
// Write Player Game State Data Node
|
||||
m_write_player_game_state_data_node_hook("WPGSDN", g_pointers->m_write_player_game_state_data_node, &hooks::write_player_game_state_data_node),
|
||||
|
||||
// GTA Thead Start
|
||||
m_gta_thread_start_hook("GTS", g_pointers->m_gta_thread_start, &hooks::gta_thread_start),
|
||||
// GTA Thread Kill
|
||||
@ -95,6 +98,7 @@ namespace big
|
||||
m_get_network_event_data_hook.enable();
|
||||
m_received_clone_sync_hook.enable();
|
||||
m_write_player_gamer_data_node_hook.enable();
|
||||
m_write_player_game_state_data_node_hook.enable();
|
||||
m_format_metric_for_sending.enable();
|
||||
|
||||
MH_ApplyQueued();
|
||||
@ -107,6 +111,7 @@ namespace big
|
||||
m_enabled = false;
|
||||
|
||||
m_format_metric_for_sending.disable();
|
||||
m_write_player_game_state_data_node_hook.disable();
|
||||
m_write_player_gamer_data_node_hook.disable();
|
||||
m_received_clone_sync_hook.disable();
|
||||
m_get_network_event_data_hook.disable();
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "MinHook.h"
|
||||
#include "gta/enums.hpp"
|
||||
#include "datanodes/player/CPlayerGamerDataNode.hpp"
|
||||
#include "datanodes/player/CPlayerGameStateDataNode.hpp"
|
||||
#include "rage/rlMetric.hpp"
|
||||
|
||||
namespace big
|
||||
@ -63,6 +64,7 @@ namespace big
|
||||
static int64_t received_clone_sync(CNetworkObjectMgr* mgr, CNetGamePlayer* src, CNetGamePlayer* dst, eObjType sync_type, uint16_t obj_id, rage::datBitBuffer* bufer, uint16_t unk, uint32_t timestamp);
|
||||
|
||||
static void write_player_gamer_data_node(rage::netObject* player, CPlayerGamerDataNode* node);
|
||||
static bool write_player_game_state_data_node(rage::netObject* player, CPlayerGameStateDataNode* node);
|
||||
};
|
||||
|
||||
class minhook_keepalive
|
||||
@ -121,7 +123,7 @@ namespace big
|
||||
detour_hook m_format_metric_for_sending;
|
||||
|
||||
detour_hook m_write_player_gamer_data_node_hook;
|
||||
|
||||
detour_hook m_write_player_game_state_data_node_hook;
|
||||
};
|
||||
|
||||
inline hooking *g_hooking{};
|
||||
|
@ -0,0 +1,14 @@
|
||||
#include "hooking.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
bool hooks::write_player_game_state_data_node(rage::netObject* player, CPlayerGameStateDataNode* node)
|
||||
{
|
||||
auto ret = g_hooking->m_write_player_game_state_data_node_hook.get_original<decltype(&write_player_game_state_data_node)>()(player, node);
|
||||
|
||||
if (g->spoofing.spoof_hide_god)
|
||||
node->m_is_invincible = false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
@ -200,6 +200,12 @@ namespace big
|
||||
m_write_bitbuf_array = ptr.add(1).rip().as<decltype(m_write_bitbuf_array)>();
|
||||
});
|
||||
|
||||
// Write Player Game State Data Node
|
||||
main_batch.add("WPGSDN", "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 30 0F B7 81 ? ? ? ?", [this](memory::handle ptr)
|
||||
{
|
||||
m_write_player_game_state_data_node = ptr.as<functions::write_player_game_state_data_node>();
|
||||
});
|
||||
|
||||
// Request Control of Entity PATCH
|
||||
main_batch.add("RCOE-Patch", "48 89 5C 24 ? 57 48 83 EC 20 8B D9 E8 ? ? ? ? ? ? ? ? 8B CB", [this](memory::handle ptr)
|
||||
{
|
||||
|
@ -51,6 +51,7 @@ namespace big
|
||||
PVOID m_network_group_override;
|
||||
PVOID m_get_label_text;
|
||||
functions::multiplayer_chat_filter* m_multiplayer_chat_filter{};
|
||||
functions::write_player_game_state_data_node m_write_player_game_state_data_node{};
|
||||
|
||||
FriendRegistry* m_friend_registry{};
|
||||
|
||||
|
@ -25,11 +25,8 @@ namespace big
|
||||
}
|
||||
ImGui::EndListBox();
|
||||
}
|
||||
if (ImGui::TreeNode("Chat"))
|
||||
{
|
||||
ImGui::Checkbox("Disable Filter", &g->session.disable_chat_filter);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
components::sub_title("Chat");
|
||||
ImGui::Checkbox("Disable Filter", &g->session.disable_chat_filter);
|
||||
}
|
||||
}
|
||||
|
@ -52,11 +52,14 @@ namespace big
|
||||
ImGui::Text("Rockstar ID:");
|
||||
ImGui::InputScalar("##rockstar_id_input", ImGuiDataType_U64, &g->spoofing.rockstar_id);
|
||||
|
||||
components::sub_title("Proofs");
|
||||
ImGui::Checkbox("Hide God Mode", &g->spoofing.spoof_hide_god);
|
||||
|
||||
components::sub_title("Crew");
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
});
|
||||
});
|
||||
|
||||
ImGui::Checkbox("Spoof Crew", &g->spoofing.spoof_crew_data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user