This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/views/network/view_spoofing.cpp

87 lines
2.7 KiB
C++
Raw Normal View History

#include "views/view.hpp"
#include "fiber_pool.hpp"
#include "util/teleport.hpp"
2022-12-06 16:12:02 +00:00
#include "core/data/region_codes.hpp"
#include "core/data/language_codes.hpp"
#include <network/ClanData.hpp>
namespace big
{
void view::spoofing()
2022-10-06 13:30:04 +02:00
{
components::small_text("SPOOFING_DESCRIPTION"_T);
ImGui::Text("!!!!! Spoofing options like name and RID have become impossible to spoof with update 1.66 !!!!!");
components::sub_title("CREW"_T);
2022-10-06 13:30:04 +02:00
ImGui::Checkbox("SPOOFING_CREW"_T.data(), &g.spoofing.spoof_crew_data);
2022-10-06 13:30:04 +02:00
constexpr size_t crew_tag_size = RTL_FIELD_SIZE(ClanData, m_clan_tag);
static char crew_tag[crew_tag_size];
strcpy_s(crew_tag, sizeof(crew_tag), g.spoofing.crew_tag.c_str());
2022-10-06 13:30:04 +02:00
ImGui::Text("SPOOFING_CREW_TAG"_T.data());
components::input_text("##crew_tag_input", crew_tag, sizeof(crew_tag));
2022-10-06 13:30:04 +02:00
if (crew_tag != g.spoofing.crew_tag)
g.spoofing.crew_tag = std::string(crew_tag);
2022-10-06 13:30:04 +02:00
ImGui::Checkbox("SPOOFING_CREW_ROCKSTAR"_T.data(), &g.spoofing.rockstar_crew);
2022-10-06 13:30:04 +02:00
ImGui::Checkbox("SPOOFING_CREW_SQUARE_TAG"_T.data(), &g.spoofing.square_crew_tag);
2022-10-06 13:30:04 +02:00
components::sub_title("SPOOFING_EXTRA"_T);
2022-10-06 13:30:04 +02:00
ImGui::Checkbox("SPOOFING_IS_CHEATER"_T.data(), &g.spoofing.spoof_cheater);
// Can't spoof RID anymore
//ImGui::Checkbox("SPOOFING_IS_DEV"_T.data(), &g.spoofing.spoof_rockstar_dev);
//ImGui::Checkbox("SPOOFING_IS_QA"_T.data(), &g.spoofing.spoof_rockstar_qa);
2022-12-06 16:12:02 +00:00
components::sub_title("SPOOFING_SESSION_ATTRIBUTES"_T);
components::small_text("SPOOFING_ONLY_WORKS_AS_HOST"_T);
2022-12-06 16:12:02 +00:00
ImGui::Checkbox("SPOOFING_ATTRIBUTE_REGION"_T.data(), &g.spoofing.spoof_session_region_type);
if (g.spoofing.spoof_session_region_type)
2022-12-06 16:12:02 +00:00
{
ImGui::SameLine();
if (ImGui::BeginCombo("###region_select", regions[g.spoofing.session_region_type].name))
2022-12-06 16:12:02 +00:00
{
for (const auto& region : regions)
{
if (ImGui::Selectable(region.name, g.spoofing.session_region_type == region.id))
2022-12-06 16:12:02 +00:00
{
g.spoofing.session_region_type = region.id;
2022-12-06 16:12:02 +00:00
}
}
ImGui::EndCombo();
}
}
ImGui::Checkbox("SPOOFING_ATTRIBUTE_LANGUAGE"_T.data(), &g.spoofing.spoof_session_language);
if (g.spoofing.spoof_session_language)
2022-12-06 16:12:02 +00:00
{
ImGui::SameLine();
if (ImGui::BeginCombo("###language_select", languages[g.spoofing.session_language].name))
2022-12-06 16:12:02 +00:00
{
for (const auto& language : languages)
{
if (ImGui::Selectable(language.name, g.spoofing.session_language == language.id))
2022-12-06 16:12:02 +00:00
{
g.spoofing.session_language = language.id;
2022-12-06 16:12:02 +00:00
};
}
ImGui::EndCombo();
}
}
ImGui::Checkbox("SPOOFING_ATTRIBUTE_PLAYER_COUNT"_T.data(), &g.spoofing.spoof_session_player_count);
if (g.spoofing.spoof_session_player_count)
2022-12-06 16:12:02 +00:00
{
ImGui::SameLine();
ImGui::InputInt("###player_count", &g.spoofing.session_player_count);
2022-12-06 16:12:02 +00:00
}
}
}