mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
Break game and protections (#3203)
This commit is contained in:
parent
dcf50fffa8
commit
0e5c8f7cfb
29
src/backend/commands/player/toxic/break_game.cpp
Normal file
29
src/backend/commands/player/toxic/break_game.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "backend/player_command.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "packet.hpp"
|
||||
#include "pointers.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class break_game : player_command
|
||||
{
|
||||
using player_command::player_command;
|
||||
|
||||
virtual CommandAccessLevel get_access_level() override
|
||||
{
|
||||
return CommandAccessLevel::AGGRESSIVE;
|
||||
}
|
||||
|
||||
virtual void execute(player_ptr player, const command_arguments& _args, const std::shared_ptr<command_context> ctx) override
|
||||
{
|
||||
packet pack;
|
||||
pack.write_message(rage::eNetMessage::MsgRoamingJoinBubbleAck);
|
||||
pack.write(0, 2);
|
||||
pack.write(10, 4);
|
||||
pack.write(0, 6);
|
||||
pack.send(player->get_net_game_player()->m_msg_id);
|
||||
}
|
||||
};
|
||||
|
||||
break_game g_break_game("breakgame", "BREAK_GAME", "BREAK_GAME_DESC", 0);
|
||||
}
|
@ -101,6 +101,10 @@ namespace big
|
||||
if (!get_msg_type(msgType, buffer))
|
||||
return g_hooking->get_original<hooks::receive_net_message>()(netConnectionManager, a2, frame);
|
||||
|
||||
|
||||
if (msgType == rage::eNetMessage::MsgRoamingJoinBubbleAck)
|
||||
return true;
|
||||
|
||||
if (player)
|
||||
{
|
||||
switch (msgType)
|
||||
@ -233,6 +237,11 @@ namespace big
|
||||
|
||||
break;
|
||||
}
|
||||
case rage::eNetMessage::MsgRoamingInitialBubble:
|
||||
{
|
||||
LOG(WARNING) << "Shouldn't get this again";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -255,6 +264,25 @@ namespace big
|
||||
}
|
||||
break;
|
||||
}
|
||||
case rage::eNetMessage::MsgNonPhysicalData:
|
||||
{
|
||||
buffer.Read<int>(7); // size
|
||||
int bubble = buffer.Read<int>(4);
|
||||
int player = buffer.Read<int>(6);
|
||||
|
||||
|
||||
if (g_player_service->get_self() && g_player_service->get_self()->id() == player)
|
||||
{
|
||||
LOG(WARNING) << "We're being replaced";
|
||||
return true;
|
||||
}
|
||||
|
||||
if (bubble != 0)
|
||||
{
|
||||
LOG(WARNING) << "Wrong bubble: " << bubble;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,8 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"mission">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"breakgame">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"error">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"ceoraid">(g_player_service->get_selected(), {});
|
||||
|
Loading…
Reference in New Issue
Block a user