mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 06:47:22 +08:00
Apply diff
This commit is contained in:
parent
a77d550f5f
commit
a217c31b8f
60
README.md
60
README.md
@ -1,59 +1,3 @@
|
|||||||
# YimMenu
|
# Message to Rockstar Security Team:
|
||||||
|
|
||||||
 
|
## You haven't seen the last of us
|
||||||
|
|
||||||
A mod menu base for Grand Theft Auto V.
|
|
||||||
Strictly for educational purposes.
|
|
||||||
|
|
||||||
YimMenu is originally based of off [BigBaseV2](https://github.com/Pocakking/BigBaseV2) which was an amazing base at the time but nowadays is a bit dated.
|
|
||||||
So here I am with an up-to-date menu focusing on protecting the user from toxic modders.
|
|
||||||
|
|
||||||
## Table of contents
|
|
||||||
|
|
||||||
* [How to build](#how-to-build)
|
|
||||||
* [Make your own flavour of YimMenu](#make-your-own-flavour-of-yimmenu)
|
|
||||||
* [Staying Up To Date](#staying-up-to-date)
|
|
||||||
* [Project Structure](#project-structure)
|
|
||||||
* [Contributing](#contributing)
|
|
||||||
|
|
||||||
## How to compile YimMenu
|
|
||||||
|
|
||||||
Read the [SETUP](https://github.com/YimMenu/YimMenu/wiki/Setup-your-PC-for-YimMenu-Development) guide.
|
|
||||||
|
|
||||||
## Make your own flavour of YimMenu
|
|
||||||
|
|
||||||
Fork YimMenu and git clone that repository instead of https://github.com/YimMenu/YimMenu.git
|
|
||||||
|
|
||||||
Click the below link to make your own fork of YimMenu:
|
|
||||||
https://github.com/YimMenu/YimMenu/fork
|
|
||||||
|
|
||||||
## Staying Up To Date
|
|
||||||
|
|
||||||
Pull the latest changes from this repository.
|
|
||||||
|
|
||||||
With a command line it is as easy as:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git pull
|
|
||||||
```
|
|
||||||
|
|
||||||
CMake should be handling removed / added files automatically without any user input.
|
|
||||||
|
|
||||||
If this is not the case for some reason you'll have to redo the steps in the [Making changes to the source code section of the SETUP](https://github.com/YimMenu/YimMenu/wiki/Setup-your-PC-for-YimMenu-Development#making-changes-to-the-source-code).
|
|
||||||
|
|
||||||
If you are doing custom modifications to the codebase and have a fork you are on your own for staying up to date with upstream (this repository), google stuff like "merge from upstream" and learn how to use Git.
|
|
||||||
|
|
||||||
## Project Structure
|
|
||||||
|
|
||||||
- `backend/` all features that should be ran in a loop are in here sorted by category
|
|
||||||
- `gui/` includes everything related to UI elements
|
|
||||||
- `hooks/` function hooks
|
|
||||||
- `native_hooks/` hooks to natives
|
|
||||||
- `services/` service files to interact and maintain stuff
|
|
||||||
- `util/` general utility functions to keep code as compact and as much in one place as possible
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
You're free to contribute to YimMenu as long as the features are useful, not overly toxic and do not contain anything money related that might get the menu targeted by Take2.
|
|
||||||
|
|
||||||
Make sure to read the [CONTRIBUTING.md](CONTRIBUTING.md) file.
|
|
@ -72,7 +72,7 @@ namespace big
|
|||||||
for (int i = 0; i < 20; i++)
|
for (int i = 0; i < 20; i++)
|
||||||
{
|
{
|
||||||
data[0] = i;
|
data[0] = i;
|
||||||
g_battleye_service.send_message(player->get_net_game_player()->get_host_token(), &data, sizeof(data));
|
g_battleye_service.send_message_to_client(player->get_net_game_player()->get_host_token(), &data, sizeof(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@ namespace big
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (player->is_host())
|
if (player->is_host())
|
||||||
player_command::get("oomkick"_J)->call(player, {});
|
player_command::get("battleupdate"_J)->call(player, {});
|
||||||
else
|
else
|
||||||
player_command::get("desync"_J)->call(player, {});
|
player_command::get("desync"_J)->call(player, {});
|
||||||
}
|
}
|
||||||
|
@ -753,6 +753,10 @@ namespace big
|
|||||||
{
|
{
|
||||||
g_battleye_service.receive_message(player->get_net_game_player()->get_host_token(), &data, size);
|
g_battleye_service.receive_message(player->get_net_game_player()->get_host_token(), &data, size);
|
||||||
}
|
}
|
||||||
|
else if (player)
|
||||||
|
{
|
||||||
|
g_battleye_service.send_message_to_server(player->get_net_game_player()->get_host_token(), &data, size);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1817,7 +1817,7 @@ namespace big
|
|||||||
// Session Request Patch
|
// Session Request Patch
|
||||||
{
|
{
|
||||||
"SRP",
|
"SRP",
|
||||||
"48 8B BD 80 01 00 00 E9 FF 00 00 00",
|
"48 8B 9D 70 01 00 00 E9 FF 00 00 00",
|
||||||
[](memory::handle ptr)
|
[](memory::handle ptr)
|
||||||
{
|
{
|
||||||
g_pointers->m_gta.m_session_request_patch = ptr.add(0x13).as<PVOID>();
|
g_pointers->m_gta.m_session_request_patch = ptr.add(0x13).as<PVOID>();
|
||||||
|
@ -76,7 +76,7 @@ namespace big
|
|||||||
return m_battleye_api.m_shutdown != nullptr;
|
return m_battleye_api.m_shutdown != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void battleye_service::send_message(std::uint64_t token, void* message, int size)
|
void battleye_service::send_message_to_client(std::uint64_t token, void* message, int size)
|
||||||
{
|
{
|
||||||
packet pkt;
|
packet pkt;
|
||||||
|
|
||||||
@ -97,6 +97,27 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void battleye_service::send_message_to_server(std::uint64_t token, void* message, int size)
|
||||||
|
{
|
||||||
|
packet pkt;
|
||||||
|
|
||||||
|
char header_buf[32];
|
||||||
|
rage::datBitBuffer header(header_buf, sizeof(header_buf));
|
||||||
|
|
||||||
|
header.Write<int>(size, 11);
|
||||||
|
header.Write<bool>(true, 1); // we are the client
|
||||||
|
|
||||||
|
pkt.write_message(rage::eNetMessage::MsgBattlEyeCmd);
|
||||||
|
pkt.m_buffer.WriteArray(&header_buf, header.GetDataLength() * 8);
|
||||||
|
pkt.m_buffer.WriteArray(message, size * 8);
|
||||||
|
|
||||||
|
// send to player
|
||||||
|
if (auto plyr = g_player_service->get_by_host_token(token); plyr && plyr->get_session_player())
|
||||||
|
{
|
||||||
|
pkt.send(plyr->get_session_player()->m_msg_id, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void battleye_service::kick_player(std::uint64_t token, const char* reason)
|
void battleye_service::kick_player(std::uint64_t token, const char* reason)
|
||||||
{
|
{
|
||||||
if (auto plyr = g_player_service->get_by_host_token(token))
|
if (auto plyr = g_player_service->get_by_host_token(token))
|
||||||
@ -186,7 +207,7 @@ namespace big
|
|||||||
g_battleye_service.kick_player(player, reason);
|
g_battleye_service.kick_player(player, reason);
|
||||||
};
|
};
|
||||||
m_battleye_user_data.m_send_message = [](std::uint64_t player, const void* pkt_data, int size) {
|
m_battleye_user_data.m_send_message = [](std::uint64_t player, const void* pkt_data, int size) {
|
||||||
g_battleye_service.send_message(player, const_cast<void*>(pkt_data), size);
|
g_battleye_service.send_message_to_client(player, const_cast<void*>(pkt_data), size);
|
||||||
};
|
};
|
||||||
if (reinterpret_cast<init_t>(GetProcAddress(handle, "Init"))(1, &m_battleye_user_data, &m_battleye_api))
|
if (reinterpret_cast<init_t>(GetProcAddress(handle, "Init"))(1, &m_battleye_user_data, &m_battleye_api))
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,8 @@ namespace big
|
|||||||
void add_player(std::uint64_t token, std::uint64_t rockstar_id, const char* name);
|
void add_player(std::uint64_t token, std::uint64_t rockstar_id, const char* name);
|
||||||
void remove_player(std::uint64_t token);
|
void remove_player(std::uint64_t token);
|
||||||
void receive_message(std::uint64_t token, void* message, int size);
|
void receive_message(std::uint64_t token, void* message, int size);
|
||||||
void send_message(std::uint64_t token, void* message, int size);
|
void send_message_to_client(std::uint64_t token, void* message, int size);
|
||||||
|
void send_message_to_server(std::uint64_t token, void* message, int size);
|
||||||
void kick_player(std::uint64_t token, const char* reason);
|
void kick_player(std::uint64_t token, const char* reason);
|
||||||
void script_func();
|
void script_func();
|
||||||
void thread_func();
|
void thread_func();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user