Add more spoofing options and added clang-format (#1020)

* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
maybegreat48
2023-03-01 21:27:15 +00:00
committed by GitHub
parent 92aea20cd6
commit 97a8c5d60b
466 changed files with 55224 additions and 35596 deletions

View File

@ -16,7 +16,7 @@ namespace big
{
ContextEntityType type;
int current_option = 0;
ImVec2 menu_size = {};
ImVec2 menu_size = {};
std::vector<context_option> options;
};
@ -36,9 +36,9 @@ namespace big
context_menu_service();
~context_menu_service();
context_menu_service(const context_menu_service&) = delete;
context_menu_service(context_menu_service&&) noexcept = delete;
context_menu_service& operator=(const context_menu_service&) = delete;
context_menu_service(const context_menu_service&) = delete;
context_menu_service(context_menu_service&&) noexcept = delete;
context_menu_service& operator=(const context_menu_service&) = delete;
context_menu_service& operator=(context_menu_service&&) noexcept = delete;
bool enabled = false;
@ -53,70 +53,56 @@ namespace big
rage::fwEntity* m_pointer{};
model_bounding_box_screen_space m_model_bounding_box_screen_space;
s_context_menu vehicle_menu{
ContextEntityType::VEHICLE,
0,{}, {
{"KILL ENGINE", [this] {
if (entity::take_control_of(m_handle))
{
VEHICLE::SET_VEHICLE_ENGINE_HEALTH(m_handle, 0.f);
VEHICLE::SET_VEHICLE_ENGINE_ON(m_handle, false, true, false);
}
}},
{"DELETE", [this] {
if (entity::take_control_of(m_handle))
{
entity::delete_entity(m_handle);
}
}},
{ "TP INTO", [this] {
teleport::into_vehicle(m_handle);
}}
} };
s_context_menu vehicle_menu{ContextEntityType::VEHICLE,
0,
{},
{{"KILL ENGINE",
[this] {
if (entity::take_control_of(m_handle))
{
VEHICLE::SET_VEHICLE_ENGINE_HEALTH(m_handle, 0.f);
VEHICLE::SET_VEHICLE_ENGINE_ON(m_handle, false, true, false);
}
}},
{"DELETE",
[this] {
if (entity::take_control_of(m_handle))
{
entity::delete_entity(m_handle);
}
}},
{"TP INTO", [this] {
teleport::into_vehicle(m_handle);
}}}};
s_context_menu ped_menu{
ContextEntityType::PED,
0,{}, {}};
s_context_menu ped_menu{ContextEntityType::PED, 0, {}, {}};
s_context_menu object_menu{
ContextEntityType::OBJECT,
0,{}, {}};
s_context_menu object_menu{ContextEntityType::OBJECT, 0, {}, {}};
s_context_menu player_menu{
ContextEntityType::PLAYER,
0,{}, {
{"STEAL IDENTITY", [this]
{
ped::steal_identity(m_handle);
}}
} };
s_context_menu player_menu{ContextEntityType::PLAYER, 0, {}, {{"STEAL IDENTITY", [this] {
ped::steal_identity(m_handle);
}}}};
s_context_menu shared_menu{
ContextEntityType::SHARED,
0,
{}, {
{"EXPLODE", [this] {
rage::fvector3 pos = *m_pointer->m_navigation->get_position();
FIRE::ADD_EXPLOSION(pos.x, pos.y, pos.z, 1, 1000, 1, 0, 1, 0);
}},
{"TP TO", [this] {
rage::fvector3 pos = *m_pointer->m_navigation->get_position();
teleport::to_coords({ pos.x, pos.y, pos.z });
}},
{"COPY HASH", [this] {
ImGui::SetClipboardText(std::format("0x{:08X}", (rage::joaat_t)m_pointer->m_model_info->m_hash).c_str());
g_notification_service->push("Context Menu", std::format("Copy hash 0x{:08X}", (rage::joaat_t)m_pointer->m_model_info->m_hash).c_str());
}}
}
};
s_context_menu shared_menu{ContextEntityType::SHARED,
0,
{},
{{"EXPLODE",
[this] {
rage::fvector3 pos = *m_pointer->m_navigation->get_position();
FIRE::ADD_EXPLOSION(pos.x, pos.y, pos.z, 1, 1000, 1, 0, 1, 0);
}},
{"TP TO",
[this] {
rage::fvector3 pos = *m_pointer->m_navigation->get_position();
teleport::to_coords({pos.x, pos.y, pos.z});
}},
{"COPY HASH", [this] {
ImGui::SetClipboardText(std::format("0x{:08X}", (rage::joaat_t)m_pointer->m_model_info->m_hash).c_str());
g_notification_service->push("Context Menu",
std::format("Copy hash 0x{:08X}", (rage::joaat_t)m_pointer->m_model_info->m_hash).c_str());
}}}};
std::unordered_map<ContextEntityType, s_context_menu> options = {
{ContextEntityType::VEHICLE, vehicle_menu},
{ContextEntityType::PLAYER, player_menu},
{ContextEntityType::PED, ped_menu},
{ContextEntityType::SHARED, shared_menu},
{ContextEntityType::OBJECT, object_menu}
};
std::unordered_map<ContextEntityType, s_context_menu> options = {{ContextEntityType::VEHICLE, vehicle_menu}, {ContextEntityType::PLAYER, player_menu}, {ContextEntityType::PED, ped_menu}, {ContextEntityType::SHARED, shared_menu}, {ContextEntityType::OBJECT, object_menu}};
};
inline context_menu_service* g_context_menu_service{};