Bug fix time (#1549)
* fix(PlayerTP): Get Current only works once * chore(README): removed features from TOC * fix(ViewNetwork): SCTV join translation * refactor: Use tunable service for no idle kick * fix(Spoofing): check for valid model before spoofing * feat(Spectate): Remove freeze and hide player blip * fix(Spectate): case of chat not being visible as spectator. * feat(Matchmaking): safer max search limit for match searching * fix(Player/Toxic): Wanted Level small text translation
This commit is contained in:
parent
d4bcd70629
commit
f6969d88c5
@ -14,7 +14,6 @@ So here I am with an up-to-date menu focusing on protecting the user from toxic
|
|||||||
* [Make your own flavour of YimMenu](#make-your-own-flavour-of-yimmenu)
|
* [Make your own flavour of YimMenu](#make-your-own-flavour-of-yimmenu)
|
||||||
* [Staying Up To Date](#staying-up-to-date)
|
* [Staying Up To Date](#staying-up-to-date)
|
||||||
* [Project Structure](#project-structure)
|
* [Project Structure](#project-structure)
|
||||||
* [Features](#features)
|
|
||||||
* [Contributing](#contributing)
|
* [Contributing](#contributing)
|
||||||
|
|
||||||
## How to compile YimMenu
|
## How to compile YimMenu
|
||||||
|
@ -22,10 +22,9 @@ namespace big
|
|||||||
bReset = true;
|
bReset = true;
|
||||||
|
|
||||||
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(false, -1);
|
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(false, -1);
|
||||||
|
NETWORK::NETWORK_OVERRIDE_RECEIVE_RESTRICTIONS_ALL(false);
|
||||||
HUD::SET_MINIMAP_IN_SPECTATOR_MODE(false, -1);
|
HUD::SET_MINIMAP_IN_SPECTATOR_MODE(false, -1);
|
||||||
|
HUD::SET_BLIP_ALPHA(HUD::GET_MAIN_PLAYER_BLIP_ID(), 255);
|
||||||
ENTITY::FREEZE_ENTITY_POSITION(ped, false);
|
|
||||||
ENTITY::FREEZE_ENTITY_POSITION(vehicle, false);
|
|
||||||
|
|
||||||
STREAMING::SET_FOCUS_ENTITY(ped);
|
STREAMING::SET_FOCUS_ENTITY(ped);
|
||||||
}
|
}
|
||||||
@ -36,10 +35,9 @@ namespace big
|
|||||||
const auto target = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id());
|
const auto target = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id());
|
||||||
|
|
||||||
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(true, target);
|
NETWORK::NETWORK_SET_IN_SPECTATOR_MODE(true, target);
|
||||||
|
NETWORK::NETWORK_OVERRIDE_RECEIVE_RESTRICTIONS_ALL(false);
|
||||||
HUD::SET_MINIMAP_IN_SPECTATOR_MODE(true, target);
|
HUD::SET_MINIMAP_IN_SPECTATOR_MODE(true, target);
|
||||||
|
HUD::SET_BLIP_ALPHA(HUD::GET_MAIN_PLAYER_BLIP_ID(), 255);
|
||||||
ENTITY::FREEZE_ENTITY_POSITION(ped, true);
|
|
||||||
ENTITY::FREEZE_ENTITY_POSITION(vehicle, true);
|
|
||||||
|
|
||||||
STREAMING::SET_FOCUS_ENTITY(target);
|
STREAMING::SET_FOCUS_ENTITY(target);
|
||||||
|
|
||||||
|
57
src/backend/looped/tunables/no_idle_kick.cpp
Normal file
57
src/backend/looped/tunables/no_idle_kick.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#include "backend/looped_command.hpp"
|
||||||
|
#include "services/tunables/tunables_service.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
class no_idle_kick : looped_command
|
||||||
|
{
|
||||||
|
using looped_command::looped_command;
|
||||||
|
|
||||||
|
std::array<int*, 8> m_tunables = { nullptr };
|
||||||
|
std::array<int, 8> m_restore;
|
||||||
|
bool m_ready_to_use;
|
||||||
|
|
||||||
|
virtual void on_tick() override
|
||||||
|
{
|
||||||
|
if (!m_ready_to_use)
|
||||||
|
{
|
||||||
|
m_tunables[0] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("IDLEKICK_WARNING1"));
|
||||||
|
m_tunables[1] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("IDLEKICK_WARNING2"));
|
||||||
|
m_tunables[2] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("IDLEKICK_WARNING3"));
|
||||||
|
m_tunables[3] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("IDLEKICK_KICK"));
|
||||||
|
m_tunables[4] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("ConstrainedKick_Warning1"));
|
||||||
|
m_tunables[5] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("ConstrainedKick_Warning2"));
|
||||||
|
m_tunables[6] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("ConstrainedKick_Warning3"));
|
||||||
|
m_tunables[7] = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("ConstrainedKick_Kick"));
|
||||||
|
|
||||||
|
// create backup of tunables
|
||||||
|
m_ready_to_use = true;
|
||||||
|
for (int i = 0; i < m_restore.size(); ++i)
|
||||||
|
{
|
||||||
|
if (m_ready_to_use = m_tunables[i]; !m_ready_to_use)
|
||||||
|
break;
|
||||||
|
m_restore[i] = *m_tunables[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (const auto& tunable : m_tunables)
|
||||||
|
{
|
||||||
|
if (tunable)
|
||||||
|
*tunable = INT_MAX;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void on_disable() override
|
||||||
|
{
|
||||||
|
for (int i = 0; m_ready_to_use && i < m_restore.size(); ++i)
|
||||||
|
{
|
||||||
|
if (m_tunables[i])
|
||||||
|
*m_tunables[i] = m_restore[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
no_idle_kick g_no_idle_kick("noidlekick", "NO_IDLE_KICK", "Prevents you from being kicked while idling.", g.tunables.no_idle_kick);
|
||||||
|
}
|
@ -11,13 +11,6 @@ namespace big
|
|||||||
g_script_patcher_service->add_patch(
|
g_script_patcher_service->add_patch(
|
||||||
{RAGE_JOAAT("freemode"), "2D 01 08 00 ? 38 00 5D ? ? ? 2A 06", 5, {0x71, 0x2E, 0x01, 0x01}, &g.session.decloak_players});
|
{RAGE_JOAAT("freemode"), "2D 01 08 00 ? 38 00 5D ? ? ? 2A 06", 5, {0x71, 0x2E, 0x01, 0x01}, &g.session.decloak_players});
|
||||||
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "2D 01 04 00 ? 2C ? ? ? 5D ? ? ? 71 57 ? ? 2C", 5, {0x2E, 0x01, 0x00}, nullptr}); // script host kick
|
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "2D 01 04 00 ? 2C ? ? ? 5D ? ? ? 71 57 ? ? 2C", 5, {0x2E, 0x01, 0x00}, nullptr}); // script host kick
|
||||||
g_script_patcher_service->add_patch(
|
|
||||||
{RAGE_JOAAT("freemode"), "2D 00 03 00 00 5D ? ? ? 71 08", 5, {0x2E, 0x00, 0x00}, &g.tunables.no_idle_kick});
|
|
||||||
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"),
|
|
||||||
"2D 00 03 00 00 5D ? ? ? 56 ? ? 72 2E ? ? 62",
|
|
||||||
5,
|
|
||||||
{0x72, 0x2E, 0x00, 0x01},
|
|
||||||
&g.tunables.no_idle_kick});
|
|
||||||
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "5D ? ? ? 76 57 ? ? 5D ? ? ? 76", 0, {0x2E, 0x00, 0x00}, nullptr}); // end session kick protection
|
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "5D ? ? ? 76 57 ? ? 5D ? ? ? 76", 0, {0x2E, 0x00, 0x00}, nullptr}); // end session kick protection
|
||||||
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "2D 01 09 00 00 5D ? ? ? 56 ? ? 2E", 5, {0x2E, 0x01, 0x00}, nullptr}); // disable death when undermap/spectating
|
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "2D 01 09 00 00 5D ? ? ? 56 ? ? 2E", 5, {0x2E, 0x01, 0x00}, nullptr}); // disable death when undermap/spectating
|
||||||
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "71 2E ? ? 55 ? ? 61 ? ? ? 47 ? ? 63", 0, {0x72}, nullptr}); // load island even if stranded animal IPL choice is not set
|
g_script_patcher_service->add_patch({RAGE_JOAAT("freemode"), "71 2E ? ? 55 ? ? 61 ? ? ? 47 ? ? 63", 0, {0x72}, nullptr}); // load island even if stranded animal IPL choice is not set
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "hooking.hpp"
|
#include "hooking.hpp"
|
||||||
|
#include "util/model_info.hpp"
|
||||||
|
|
||||||
#include <netsync/nodes/player/CPlayerAppearanceDataNode.hpp>
|
#include <netsync/nodes/player/CPlayerAppearanceDataNode.hpp>
|
||||||
|
|
||||||
@ -10,7 +11,10 @@ namespace big
|
|||||||
|
|
||||||
if (g.spoofing.spoof_player_model)
|
if (g.spoofing.spoof_player_model)
|
||||||
{
|
{
|
||||||
node->m_model_hash = rage::joaat(g.spoofing.player_model);
|
if (const auto model_hash = rage::joaat(g.spoofing.player_model); model_info::does_model_exist(model_hash))
|
||||||
|
{
|
||||||
|
node->m_model_hash = model_hash;
|
||||||
|
}
|
||||||
node->m_has_head_blend_data = false;
|
node->m_has_head_blend_data = false;
|
||||||
node->components.m_component_bitset = 0;
|
node->components.m_component_bitset = 0;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ namespace big
|
|||||||
class matchmaking_service
|
class matchmaking_service
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
constexpr static int MAX_SESSIONS_TO_FIND = 1063;
|
constexpr static int MAX_SESSIONS_TO_FIND = 1000;
|
||||||
|
|
||||||
struct session_attributes
|
struct session_attributes
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ namespace big
|
|||||||
components::sub_title("Misc");
|
components::sub_title("Misc");
|
||||||
if (ImGui::BeginListBox("##miscsession", get_listbox_dimensions()))
|
if (ImGui::BeginListBox("##miscsession", get_listbox_dimensions()))
|
||||||
{
|
{
|
||||||
ImGui::Checkbox("Join Sctv", &g.session.join_in_sctv_slots); //CHANGE TRANSLATION JOIN_IN_SCTV
|
ImGui::Checkbox("JOIN_IN_SCTV"_T.data(), &g.session.join_in_sctv_slots);
|
||||||
if (ImGui::IsItemHovered())
|
if (ImGui::IsItemHovered())
|
||||||
ImGui::SetTooltip("JOIN_IN_SCTV_DESC"_T.data());
|
ImGui::SetTooltip("JOIN_IN_SCTV_DESC"_T.data());
|
||||||
|
|
||||||
|
@ -116,16 +116,13 @@ namespace big
|
|||||||
"Interior");
|
"Interior");
|
||||||
|
|
||||||
static float new_location[3];
|
static float new_location[3];
|
||||||
static float current_location[3] = {
|
auto& current_location = *reinterpret_cast<float(*)[3]>(g_player_service->get_selected()->get_ped()->m_navigation->get_position());
|
||||||
g_player_service->get_selected()->get_ped()->m_navigation->get_position()->x,
|
|
||||||
g_player_service->get_selected()->get_ped()->m_navigation->get_position()->y,
|
|
||||||
g_player_service->get_selected()->get_ped()->m_navigation->get_position()->z};
|
|
||||||
|
|
||||||
components::small_text("Custom TP");
|
components::small_text("Custom TP");
|
||||||
ImGui::SetNextItemWidth(400);
|
ImGui::SetNextItemWidth(400);
|
||||||
ImGui::InputFloat3("##customlocation", new_location);
|
ImGui::InputFloat3("##customlocation", new_location);
|
||||||
components::button("TP", [] {
|
components::button("TP", [] {
|
||||||
teleport::teleport_player_to_coords(g_player_service->get_selected(), {new_location[0], new_location[1], new_location[2]});
|
teleport::teleport_player_to_coords(g_player_service->get_selected(), *reinterpret_cast<rage::fvector3*>(&new_location));
|
||||||
});
|
});
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button("Get current"))
|
if (ImGui::Button("Get current"))
|
||||||
|
@ -47,7 +47,7 @@ namespace big
|
|||||||
components::player_command_button<"fakeban">(g_player_service->get_selected(), {});
|
components::player_command_button<"fakeban">(g_player_service->get_selected(), {});
|
||||||
|
|
||||||
static int wanted_level;
|
static int wanted_level;
|
||||||
components::small_text("WANTED_LVL");
|
components::small_text("WANTED_LVL"_T);
|
||||||
ImGui::SliderInt("##wantedlevelslider", &wanted_level, 0, 5);
|
ImGui::SliderInt("##wantedlevelslider", &wanted_level, 0, 5);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
components::player_command_button<"wanted">(g_player_service->get_selected(), {(uint64_t)wanted_level}, "Set");
|
components::player_command_button<"wanted">(g_player_service->get_selected(), {(uint64_t)wanted_level}, "Set");
|
||||||
|
@ -45,7 +45,7 @@ namespace big
|
|||||||
components::command_checkbox<"noclip">();
|
components::command_checkbox<"noclip">();
|
||||||
components::command_checkbox<"noragdoll">();
|
components::command_checkbox<"noragdoll">();
|
||||||
components::command_checkbox<"fastrun">();
|
components::command_checkbox<"fastrun">();
|
||||||
ImGui::Checkbox("NO_IDLE_KICK"_T.data(), &g.tunables.no_idle_kick);
|
components::command_checkbox<"noidlekick">();
|
||||||
components::command_checkbox<"walkunder">();
|
components::command_checkbox<"walkunder">();
|
||||||
if (!g.self.super_jump)
|
if (!g.self.super_jump)
|
||||||
components::command_checkbox<"beastjump">();
|
components::command_checkbox<"beastjump">();
|
||||||
|
Reference in New Issue
Block a user