Merge: rework_gui > master
This commit is contained in:
parent
b2a305027f
commit
94c5710abb
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,6 +31,7 @@
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.bat
|
||||
|
||||
### CMake ###
|
||||
CMakeLists.txt.user
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "enums.hpp"
|
||||
#include "file_manager.hpp"
|
||||
#include "imgui.h"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -131,6 +132,12 @@ namespace big
|
||||
bool users = true;
|
||||
bool player = false;
|
||||
|
||||
ImFont* font_title = nullptr;
|
||||
ImFont* font_sub_title = nullptr;
|
||||
ImFont* font_small = nullptr;
|
||||
|
||||
bool switched_view = true;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
#include "gui/window.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "util/notify.hpp"
|
||||
|
||||
namespace big
|
||||
@ -26,86 +26,63 @@ namespace big
|
||||
static ImVec4 whiteBroken = ImVec4(0.792f, 0.784f, 0.827f, 1.f);
|
||||
|
||||
auto& style = ImGui::GetStyle();
|
||||
style.WindowPadding = { 10.f, 10.f };
|
||||
style.PopupRounding = 0.f;
|
||||
style.FramePadding = { 8.f, 4.f };
|
||||
style.ItemSpacing = { 10.f, 8.f };
|
||||
style.ItemInnerSpacing = { 6.f, 6.f };
|
||||
style.TouchExtraPadding = { 0.f, 0.f };
|
||||
style.IndentSpacing = 21.f;
|
||||
style.ScrollbarSize = 15.f;
|
||||
style.GrabMinSize = 8.f;
|
||||
style.WindowPadding = ImVec2(15, 15);
|
||||
style.WindowRounding = 0.f;
|
||||
style.WindowBorderSize = 0.f;
|
||||
style.ChildBorderSize = 0.f;
|
||||
style.PopupBorderSize = 0.f;
|
||||
style.FrameBorderSize = 0.f;
|
||||
style.TabBorderSize = 0.f;
|
||||
style.WindowRounding = 5.f;
|
||||
style.ChildRounding = 2.f;
|
||||
style.FrameRounding = 3.f;
|
||||
style.ScrollbarRounding = 3.f;
|
||||
style.GrabRounding = 0.f;
|
||||
style.TabRounding = 3.f;
|
||||
style.WindowTitleAlign = { 0.5f, 0.5f };
|
||||
style.ButtonTextAlign = { 0.5f, 0.5f };
|
||||
style.DisplaySafeAreaPadding = { 3.f, 3.f };
|
||||
style.FramePadding = ImVec2(5, 5);
|
||||
style.FrameRounding = 4.0f;
|
||||
style.ItemSpacing = ImVec2(12, 8);
|
||||
style.ItemInnerSpacing = ImVec2(8, 6);
|
||||
style.IndentSpacing = 25.0f;
|
||||
style.ScrollbarSize = 15.0f;
|
||||
style.ScrollbarRounding = 9.0f;
|
||||
style.GrabMinSize = 5.0f;
|
||||
style.GrabRounding = 3.0f;
|
||||
style.ChildRounding = 4.0f;
|
||||
|
||||
auto& colors = style.Colors;
|
||||
colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(1.00f, 0.90f, 0.19f, 1.00f);
|
||||
colors[ImGuiCol_WindowBg] = bgColor;
|
||||
colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
|
||||
colors[ImGuiCol_Border] = ImVec4(0.30f, 0.30f, 0.30f, 0.50f);
|
||||
colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
||||
colors[ImGuiCol_FrameBg] = ImVec4(0.21f, 0.21f, 0.21f, 0.54f);
|
||||
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.21f, 0.21f, 0.21f, 0.78f);
|
||||
colors[ImGuiCol_FrameBgActive] = ImVec4(0.28f, 0.27f, 0.27f, 0.54f);
|
||||
colors[ImGuiCol_TitleBg] = ImVec4(0.17f, 0.17f, 0.17f, 1.00f);
|
||||
colors[ImGuiCol_TitleBgActive] = ImVec4(0.19f, 0.19f, 0.19f, 1.00f);
|
||||
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
|
||||
colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarBg] = colors[ImGuiCol_WindowBg];
|
||||
colors[ImGuiCol_ScrollbarGrab] = primary;
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = secondary;
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = primary;
|
||||
colors[ImGuiCol_CheckMark] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
|
||||
colors[ImGuiCol_SliderGrab] = ImVec4(0.34f, 0.34f, 0.34f, 1.00f);
|
||||
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.39f, 0.38f, 0.38f, 1.00f);
|
||||
colors[ImGuiCol_Button] = primary;
|
||||
colors[ImGuiCol_ButtonHovered] = secondary;
|
||||
colors[ImGuiCol_ButtonActive] = colors[ImGuiCol_ButtonHovered];
|
||||
colors[ImGuiCol_Header] = ImVec4(0.37f, 0.37f, 0.37f, 0.31f);
|
||||
colors[ImGuiCol_HeaderHovered] = ImVec4(0.38f, 0.38f, 0.38f, 0.37f);
|
||||
colors[ImGuiCol_HeaderActive] = ImVec4(0.37f, 0.37f, 0.37f, 0.51f);
|
||||
colors[ImGuiCol_Separator] = ImVec4(0.38f, 0.38f, 0.38f, 0.50f);
|
||||
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.46f, 0.46f, 0.46f, 0.50f);
|
||||
colors[ImGuiCol_SeparatorActive] = ImVec4(0.46f, 0.46f, 0.46f, 0.64f);
|
||||
colors[ImGuiCol_ResizeGrip] = whiteBroken;
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.f, 1.f, 1.f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGripActive] = whiteBroken;
|
||||
colors[ImGuiCol_Tab] = ImVec4(0.21f, 0.21f, 0.21f, 0.86f);
|
||||
colors[ImGuiCol_TabHovered] = ImVec4(0.27f, 0.27f, 0.27f, 0.86f);
|
||||
colors[ImGuiCol_TabActive] = ImVec4(0.34f, 0.34f, 0.34f, 0.86f);
|
||||
colors[ImGuiCol_TabUnfocused] = ImVec4(0.10f, 0.10f, 0.10f, 0.97f);
|
||||
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.15f, 0.15f, 0.15f, 1.00f);
|
||||
colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
|
||||
colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
|
||||
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
||||
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
|
||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
||||
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
||||
colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
|
||||
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
|
||||
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
|
||||
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
|
||||
colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
|
||||
colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
|
||||
colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
|
||||
colors[ImGuiCol_ChildBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
|
||||
colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
|
||||
colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f);
|
||||
colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
|
||||
colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
|
||||
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
|
||||
colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
|
||||
colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
|
||||
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
|
||||
colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
|
||||
colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
|
||||
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
|
||||
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
|
||||
colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
|
||||
colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
|
||||
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
|
||||
colors[ImGuiCol_Button] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
|
||||
colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
|
||||
colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
|
||||
colors[ImGuiCol_Header] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
|
||||
colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
|
||||
colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
||||
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
|
||||
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
|
||||
colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
|
||||
colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
|
||||
colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
|
||||
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
|
||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f);
|
||||
}
|
||||
|
||||
void gui::dx_on_tick()
|
||||
{
|
||||
TRY_CLAUSE
|
||||
{
|
||||
window::draw_all();
|
||||
view::root();
|
||||
}
|
||||
EXCEPT_CLAUSE
|
||||
}
|
||||
|
15
BigBaseV2/src/gui/components/button.cpp
Normal file
15
BigBaseV2/src/gui/components/button.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "gui/components/components.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
bool components::button(const std::string_view text) {
|
||||
return ImGui::Button(text.data());
|
||||
}
|
||||
|
||||
void components::button(const std::string_view text, std::function<void()> cb) {
|
||||
if (components::button(text)) {
|
||||
g_fiber_pool->queue_job(cb);
|
||||
}
|
||||
}
|
||||
}
|
17
BigBaseV2/src/gui/components/components.hpp
Normal file
17
BigBaseV2/src/gui/components/components.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "imgui.h"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class components
|
||||
{
|
||||
static void custom_text(const std::string_view, ImFont*);
|
||||
public:
|
||||
static bool nav_button(const std::string_view);
|
||||
static bool button(const std::string_view);
|
||||
static void small_text(const std::string_view);
|
||||
static void sub_title(const std::string_view);
|
||||
static void title(const std::string_view);
|
||||
static void button(const std::string_view, std::function<void()>);
|
||||
};
|
||||
}
|
11
BigBaseV2/src/gui/components/custom_text.cpp
Normal file
11
BigBaseV2/src/gui/components/custom_text.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "gui/components/components.hpp"
|
||||
#include "fonts/fonts.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void components::custom_text(const std::string_view text, ImFont* font) {
|
||||
ImGui::PushFont(font);
|
||||
ImGui::TextWrapped(text.data());
|
||||
ImGui::PopFont();
|
||||
}
|
||||
}
|
17
BigBaseV2/src/gui/components/nav_button.cpp
Normal file
17
BigBaseV2/src/gui/components/nav_button.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "gui/components/components.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
bool components::nav_button(const std::string_view text)
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.f, 0.f, 0.f, 0.f));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.f, 0.f, 0.f, 0.f));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, { 0.f, 0.5f });
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, { 0, 5 });
|
||||
bool result = ImGui::Button(text.data(), {((float)g->window.x * 0.15f) - 30, 0});
|
||||
ImGui::PopStyleVar(2);
|
||||
ImGui::PopStyleColor(2);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
9
BigBaseV2/src/gui/components/small.cpp
Normal file
9
BigBaseV2/src/gui/components/small.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "gui/components/components.hpp"
|
||||
#include "fonts/fonts.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void components::small_text(const std::string_view text) {
|
||||
components::custom_text(text.data(), g->window.font_small);
|
||||
}
|
||||
}
|
9
BigBaseV2/src/gui/components/sub_title.cpp
Normal file
9
BigBaseV2/src/gui/components/sub_title.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "gui/components/components.hpp"
|
||||
#include "fonts/fonts.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void components::sub_title(const std::string_view text) {
|
||||
components::custom_text(text.data(), g->window.font_sub_title);
|
||||
}
|
||||
}
|
9
BigBaseV2/src/gui/components/title.cpp
Normal file
9
BigBaseV2/src/gui/components/title.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "gui/components/components.hpp"
|
||||
#include "fonts/fonts.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void components::title(const std::string_view text) {
|
||||
components::custom_text(text.data(), g->window.font_title);
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#pragma once
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class window {
|
||||
static void debug();
|
||||
static void top_bar();
|
||||
static void handling();
|
||||
static void log();
|
||||
static void main();
|
||||
static void w_player();
|
||||
static void users();
|
||||
|
||||
public:
|
||||
static void draw_all()
|
||||
{
|
||||
window::top_bar();
|
||||
|
||||
window::debug();
|
||||
|
||||
window::main();
|
||||
window::handling();
|
||||
|
||||
window::w_player();
|
||||
window::users();
|
||||
}
|
||||
};
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#include "debug_tabs.hpp"
|
||||
#include "util/system.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_debug::_tab_debug()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Debug"))
|
||||
{
|
||||
ImGui::Checkbox("Script Event Logging", &g->debug.script_event_logging);
|
||||
|
||||
if (ImGui::Button("Dump entrypoints"))
|
||||
{
|
||||
system::dump_entry_points();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
#include "debug_tabs.hpp"
|
||||
#include "services/globals_service.hpp"
|
||||
#include "thread_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_debug::tab_globals()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Globals"))
|
||||
{
|
||||
if (ImGui::Checkbox("Enable Freezing", &g_globals_service->m_running) && g_globals_service->m_running)
|
||||
g_thread_pool->push([&]() { g_globals_service->loop(); });
|
||||
|
||||
if (ImGui::Button("Load"))
|
||||
g_globals_service->load();
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Save"))
|
||||
g_globals_service->save();
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Add Global"))
|
||||
{
|
||||
ImGui::OpenPopup("New Global");
|
||||
}
|
||||
|
||||
modal_debug::modal_new_global();
|
||||
|
||||
for (auto& global : g_globals_service->m_globals)
|
||||
{
|
||||
char label[64];
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
sprintf(label, "Freeze##%d", global.get_id());
|
||||
ImGui::Checkbox(label, &global.m_freeze);
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Text("Name:");
|
||||
ImGui::Text("Value:");
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Text(global.m_name.c_str());
|
||||
|
||||
sprintf(label, "###input_%d", global.get_id());
|
||||
ImGui::SetNextItemWidth(200.f);
|
||||
ImGui::InputInt(label, global.get());
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
sprintf(label, "Delete##%d", global.get_id());
|
||||
if (ImGui::Button(label))
|
||||
{
|
||||
for (int i = 0; i < g_globals_service->m_globals.size(); i++)
|
||||
if (auto& it = g_globals_service->m_globals.at(i); it.get_id() == global.get_id())
|
||||
g_globals_service->m_globals.erase(g_globals_service->m_globals.begin() + i);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(label, "Write###%d", global.get_id());
|
||||
if (ImGui::Button(label))
|
||||
global.write();
|
||||
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
#include "debug_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "script.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_debug::tab_script_events()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Script Events"))
|
||||
{
|
||||
static int64_t* args;
|
||||
static int event_arg_count = 1;
|
||||
static int previous_arg_count;
|
||||
static int event_player_bits;
|
||||
static bool event_everyone = false;
|
||||
|
||||
ImGui::Text("Script Argument Count:");
|
||||
ImGui::InputInt("###script_event_arg_count", &event_arg_count);
|
||||
if (event_arg_count > 32)
|
||||
event_arg_count = 32;
|
||||
else if (event_arg_count < 1)
|
||||
event_arg_count = 1;
|
||||
|
||||
if (event_arg_count != previous_arg_count)
|
||||
{
|
||||
int64_t* temp_args = new int64_t[event_arg_count] {0};
|
||||
memcpy(temp_args, args, sizeof(int64_t) * std::min(event_arg_count, previous_arg_count));
|
||||
|
||||
delete[] args;
|
||||
args = temp_args;
|
||||
|
||||
previous_arg_count = event_arg_count;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
for (int i = 0; i < event_arg_count; i++)
|
||||
{
|
||||
ImGui::Text("Arg[%d]", i);
|
||||
ImGui::SameLine();
|
||||
|
||||
char input_arg_name[20];
|
||||
sprintf(input_arg_name, "###input_dynamic_arg_%d", i);
|
||||
ImGui::InputScalar(input_arg_name, ImGuiDataType_S64, &args[i]);
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Checkbox("Send to everyone", &event_everyone);
|
||||
if (!event_everyone)
|
||||
{
|
||||
ImGui::Text("Player ID:");
|
||||
ImGui::InputInt("###player_bits", &event_player_bits);
|
||||
}
|
||||
|
||||
if (ImGui::Button("Send Event"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
g_pointers->m_trigger_script_event(1, args, event_arg_count, event_everyone ? -1 : 1 << event_player_bits);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "imgui.h"
|
||||
|
||||
namespace big
|
||||
{
|
||||
namespace modal_debug
|
||||
{
|
||||
void modal_new_global();
|
||||
}
|
||||
|
||||
namespace tab_debug
|
||||
{
|
||||
void tab_globals();
|
||||
void tab_script_events();
|
||||
void _tab_debug();
|
||||
}
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
#include "../debug_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "thread_pool.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "services/globals_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void modal_debug::modal_new_global()
|
||||
{
|
||||
ImGui::SetNextWindowSize({ 520, 325 }, ImGuiCond_FirstUseEver);
|
||||
if (ImGui::BeginPopupModal("New Global"))
|
||||
{
|
||||
static int base_address = 0;
|
||||
static bool freeze = false;
|
||||
static char name[32] = "";
|
||||
static int (*offsets)[2] = nullptr;
|
||||
static int offset_count = 0;
|
||||
static int previous_offset_count = 0;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
ImGui::Text("Name:");
|
||||
ImGui::InputText("##modal_global_name", name, sizeof(name));
|
||||
ImGui::Text("Base Address:");
|
||||
ImGui::InputInt("##modal_global_base_addr", &base_address);
|
||||
ImGui::Text("Freeze:");
|
||||
ImGui::Checkbox("##modal_global_freeze", &freeze);
|
||||
ImGui::Text("Number of Offsets:");
|
||||
ImGui::InputInt("##modal_offset_count", &offset_count);
|
||||
|
||||
if (offset_count < 0) offset_count;
|
||||
else if (offset_count > 10) offset_count = 10;
|
||||
|
||||
if (offset_count != previous_offset_count)
|
||||
{
|
||||
int(*new_offsets)[2] = new int[offset_count][2]{ 0 };
|
||||
memcpy(new_offsets, offsets, sizeof(int) * std::min(offset_count, previous_offset_count) * 2);
|
||||
|
||||
delete[] offsets;
|
||||
offsets = new_offsets;
|
||||
|
||||
previous_offset_count = offset_count;
|
||||
}
|
||||
|
||||
ImGui::PushItemWidth(320.f);
|
||||
for (int i = 0; i < offset_count; i++)
|
||||
{
|
||||
char id[32];
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("Offset: %d", i + 1);
|
||||
|
||||
sprintf(id, "##offset_%d", i);
|
||||
ImGui::InputInt(id, &offsets[i][0]);
|
||||
|
||||
ImGui::Text("Size:");
|
||||
ImGui::SameLine();
|
||||
sprintf(id, "##size_%d", i);
|
||||
ImGui::InputInt(id, &offsets[i][1]);
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (ImGui::Button("Cancel"))
|
||||
{
|
||||
strcpy(name, "");
|
||||
freeze = false;
|
||||
delete[] offsets;
|
||||
offsets = nullptr;
|
||||
offset_count = 0;
|
||||
previous_offset_count = 0;
|
||||
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Save"))
|
||||
{
|
||||
auto new_global = global(name, base_address, freeze, offsets, offset_count);
|
||||
new_global.build_cache();
|
||||
|
||||
g_globals_service->m_globals.push_back(new_global);
|
||||
|
||||
strcpy(name, "");
|
||||
freeze = false;
|
||||
delete[] offsets;
|
||||
offsets = nullptr;
|
||||
offset_count = 0;
|
||||
previous_offset_count = 0;
|
||||
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "imgui.h"
|
||||
|
||||
namespace big::tab_main
|
||||
{
|
||||
void tab_mobile();
|
||||
void tab_tunables();
|
||||
void tab_self();
|
||||
void tab_recovery();
|
||||
void tab_settings();
|
||||
void tab_spawn();
|
||||
void tab_spoofing();
|
||||
void tab_vehicle();
|
||||
void tab_weapons();
|
||||
void tab_teleport();
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
#include "main_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "util/notify.hpp"
|
||||
#include "services/mobile_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_mobile()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Mobile"))
|
||||
{
|
||||
if (ImGui::Button("Mors Mutual Fix All Vehicles"))
|
||||
{
|
||||
int amount_fixed = mobile::mors_mutual::fix_all();
|
||||
|
||||
g_fiber_pool->queue_job([amount_fixed]
|
||||
{
|
||||
notify::above_map(
|
||||
fmt::format("<C>{}</C> vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have")
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::TreeNode("Lester"))
|
||||
{
|
||||
ImGui::Checkbox("Off Radar", &g->self.off_radar);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::TreeNode("Mechanic - Personal Vehicles"))
|
||||
{
|
||||
static char search[64];
|
||||
static std::string lower_search;
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::SetNextItemWidth(400.f);
|
||||
if (ImGui::InputTextWithHint("##search_pv_list", "Search", search, sizeof(search)))
|
||||
{
|
||||
lower_search = search;
|
||||
std::transform(lower_search.begin(), lower_search.end(), lower_search.begin(), tolower);
|
||||
}
|
||||
|
||||
if (ImGui::ListBoxHeader("##personal_veh_list", { 400.f, 500.f }))
|
||||
{
|
||||
for (auto& it : g_mobile_service->m_personal_vehicles)
|
||||
{
|
||||
std::string label = it.first;
|
||||
auto& personal_veh = it.second;
|
||||
|
||||
std::string lower = label.c_str();
|
||||
std::transform(lower.begin(), lower.end(), lower.begin(), ::tolower);
|
||||
|
||||
if (lower.find(lower_search) != std::string::npos)
|
||||
{
|
||||
if (ImGui::Selectable(
|
||||
label.c_str(),
|
||||
personal_veh->get_id() == mobile::util::get_current_personal_vehicle()
|
||||
))
|
||||
{
|
||||
strcpy(search, "");
|
||||
lower_search = search;
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE(&personal_veh)
|
||||
{
|
||||
personal_veh->summon();
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
if (ImGui::Button("Load/Reload Personal Vehicles"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
g_mobile_service->register_vehicles();
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
ImGui::Checkbox("Spawn in Vehicle", &g->vehicle.pv_teleport_into);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "main_tabs.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/player.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_recovery()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Recovery"))
|
||||
{
|
||||
ImGui::Text("Set Current Character Level:");
|
||||
ImGui::SliderInt("##input_levels_self", &g->player.set_level, 0, 8000);
|
||||
if (ImGui::Button("Set Level"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
player::set_player_level(g->player.set_level);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
#include "main_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "script_global.hpp"
|
||||
#include "util/entity.hpp"
|
||||
#include "util/player.hpp"
|
||||
#include "util/notify.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_self()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Self"))
|
||||
{
|
||||
if (ImGui::Button("Suicide"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
ENTITY::SET_ENTITY_HEALTH(PLAYER::PLAYER_PED_ID(), 0, 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("General"))
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("God Mode", &g->self.godmode);
|
||||
ImGui::Checkbox("Off Radar", &g->self.off_radar);
|
||||
ImGui::Checkbox("Free Cam", &g->self.free_cam);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("No Clip", &g->self.noclip);
|
||||
ImGui::Checkbox("No Ragdoll", &g->self.no_ragdoll);
|
||||
ImGui::Checkbox("Super Run", &g->self.super_run);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Frame Flags"))
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Explosive Ammo", &g->self.frame_flags.explosive_ammo);
|
||||
ImGui::Checkbox("Fire Ammo", &g->self.frame_flags.fire_ammo);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Explosive Melee", &g->self.frame_flags.explosive_melee);
|
||||
ImGui::Checkbox("Super Jump", &g->self.frame_flags.super_jump);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Player Model"))
|
||||
{
|
||||
static char model[32];
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
if (
|
||||
ImGui::InputText("Model Name###player_ped_model", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) ||
|
||||
ImGui::Button("Set Player Model###spawn_player_ped_model")
|
||||
)
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
Hash hash = rage::joaat(model);
|
||||
|
||||
for (uint8_t i = 0; !STREAMING::HAS_MODEL_LOADED(hash) && i < 100; i++)
|
||||
{
|
||||
STREAMING::REQUEST_MODEL(hash);
|
||||
|
||||
script::get_current()->yield();
|
||||
}
|
||||
if (!STREAMING::HAS_MODEL_LOADED(hash))
|
||||
{
|
||||
notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
PLAYER::SET_PLAYER_MODEL(PLAYER::GET_PLAYER_INDEX(), hash);
|
||||
PED::SET_PED_DEFAULT_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID());
|
||||
script::get_current()->yield();
|
||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Police"))
|
||||
{
|
||||
ImGui::Checkbox("Never Wanted", &g->self.never_wanted);
|
||||
|
||||
if (!g->self.never_wanted)
|
||||
{
|
||||
ImGui::Checkbox("Force Wanted Level", &g->self.force_wanted_level);
|
||||
ImGui::Text("Wanted Level");
|
||||
if (ImGui::SliderInt("###wanted_level", &g->self.wanted_level, 0, 5) && !g->self.force_wanted_level)
|
||||
g_local_player->m_player_info->m_wanted_level = g->self.wanted_level;
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
#include "main_tabs.hpp"
|
||||
#include "widgets/imgui_hotkey.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_settings()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Settings"))
|
||||
{
|
||||
if (ImGui::TreeNode("Hotkeys"))
|
||||
{
|
||||
ImGui::PushItemWidth(350.f);
|
||||
ImGui::BeginGroup();
|
||||
|
||||
if (ImGui::Hotkey("Menu Toggle", &g->settings.hotkeys.menu_toggle))
|
||||
g->settings.hotkeys.editing_menu_toggle = true; // make our menu reappear
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Text("(Below hotkey is not implemented)");
|
||||
ImGui::Hotkey("Teleport to waypoint", &g->settings.hotkeys.teleport_waypoint);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Protections"))
|
||||
{
|
||||
ImGui::Checkbox("Bounty", &g->protections.script_events.bounty);
|
||||
ImGui::Checkbox("CEO Ban", &g->protections.script_events.ceo_ban);
|
||||
ImGui::Checkbox("CEO Kick", &g->protections.script_events.ceo_kick);
|
||||
ImGui::Checkbox("CEO Money", &g->protections.script_events.ceo_money);
|
||||
ImGui::Checkbox("Wanted Level", &g->protections.script_events.clear_wanted_level);
|
||||
ImGui::Checkbox("Fake Deposit", &g->protections.script_events.fake_deposit);
|
||||
ImGui::Checkbox("Force Mission", &g->protections.script_events.force_mission);
|
||||
ImGui::Checkbox("Force Teleport", &g->protections.script_events.force_teleport);
|
||||
ImGui::Checkbox("GTA Banner", &g->protections.script_events.gta_banner);
|
||||
ImGui::Checkbox("Network Bail", &g->protections.script_events.network_bail);
|
||||
ImGui::Checkbox("Destroy Personal Vehicle", &g->protections.script_events.personal_vehicle_destroyed);
|
||||
ImGui::Checkbox("Remote Off Radar", &g->protections.script_events.remote_off_radar);
|
||||
ImGui::Checkbox("Rotate Cam", &g->protections.script_events.rotate_cam);
|
||||
ImGui::Checkbox("Send to Cutscene", &g->protections.script_events.send_to_cutscene);
|
||||
ImGui::Checkbox("Send to Island", &g->protections.script_events.send_to_island);
|
||||
ImGui::Checkbox("Sound Spam", &g->protections.script_events.sound_spam);
|
||||
ImGui::Checkbox("Spectate", &g->protections.script_events.spectate);
|
||||
ImGui::Checkbox("Transaction Error", &g->protections.script_events.transaction_error);
|
||||
ImGui::Checkbox("Vehicle Kick", &g->protections.script_events.vehicle_kick);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
#include "main_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static char model[12];
|
||||
|
||||
void tab_main::tab_spawn()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Spawn"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
if (
|
||||
ImGui::InputText("Model Name", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) ||
|
||||
ImGui::Button("Spawn")
|
||||
)
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(PLAYER::GET_PLAYER_INDEX());
|
||||
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, .0, 8.0, .5);
|
||||
|
||||
vehicle::spawn((const char*)model, location, ENTITY::GET_ENTITY_HEADING(player) + 90.f);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
#include "main_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_spoofing()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Spoofing"))
|
||||
{
|
||||
ImGui::Text("To spoof any of the below credentials you need to reconnect with the lobby.");
|
||||
|
||||
if (ImGui::TreeNode("Username"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
ImGui::Checkbox("Spoof Username", &g->spoofing.spoof_username);
|
||||
|
||||
static char name[20];
|
||||
strcpy_s(name, sizeof(name), g->spoofing.username.c_str());
|
||||
|
||||
ImGui::Text("Username:");
|
||||
ImGui::InputText("##username_input", name, sizeof(name));
|
||||
|
||||
if (name != g->spoofing.username)
|
||||
g->spoofing.username = std::string(name);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("IP Address"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
ImGui::Checkbox("Spoof IP", &g->spoofing.spoof_ip);
|
||||
|
||||
ImGui::Text("IP Address:");
|
||||
ImGui::DragInt4("##ip_fields", g->spoofing.ip_address, 0, 255);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Rockstar ID"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
ImGui::Checkbox("Spoof Rockstar ID", &g->spoofing.spoof_rockstar_id);
|
||||
|
||||
ImGui::Text("Rockstar ID:");
|
||||
ImGui::InputScalar("##rockstar_id_input", ImGuiDataType_U64, &g->spoofing.rockstar_id);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
#include "main_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/globals.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_teleport()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Teleport"))
|
||||
{
|
||||
ImGui::BeginChild("col1", { 200.f, 0.f });
|
||||
|
||||
ImGui::Text("Blips:");
|
||||
|
||||
if (ImGui::Button("Waypoint"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
teleport::to_waypoint();
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::Button("Objective"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
static const int blips[] = {1, 57, 128, 129, 130, 143, 144, 145, 146, 271, 286, 287, 288};
|
||||
for (int i = 0; i < (sizeof(blips)/sizeof(*blips)); i++) {
|
||||
if (teleport::to_blip(blips[i], 5)) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
||||
ImGui::EndChild();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginChild("col2", { 0.f, 0.f });
|
||||
|
||||
ImGui::Text("Vehicles:");
|
||||
|
||||
if (ImGui::Button("Bring Personal Vehicle"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Vehicle veh = globals::get_personal_vehicle();
|
||||
if (ENTITY::IS_ENTITY_DEAD(veh, false)) return notify::above_map("Invalid vehicle handle...");
|
||||
|
||||
Vector3 location = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true);
|
||||
|
||||
vehicle::bring(veh, location);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::Button("Teleport to Personal Vehicle"))
|
||||
{
|
||||
Vehicle veh = globals::get_personal_vehicle();
|
||||
if (ENTITY::IS_ENTITY_DEAD(veh, false)) return notify::above_map("Invalid vehicle handle...");
|
||||
|
||||
teleport::to_coords(
|
||||
ENTITY::GET_ENTITY_COORDS(veh, true)
|
||||
);
|
||||
}
|
||||
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#include "main_tabs.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_tunables()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Tunables"))
|
||||
{
|
||||
ImGui::Checkbox("Disable Phone", &g->tunables.disable_phone);
|
||||
ImGui::Checkbox("No Idle Kick", &g->tunables.no_idle_kick);
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
#include "core/data/speedo_meters.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "main_tabs.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static char model[12];
|
||||
|
||||
void tab_main::tab_vehicle()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Vehicle"))
|
||||
{
|
||||
if (ImGui::TreeNode("General"))
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Can Be Targeted", &g->vehicle.is_targetable);
|
||||
ImGui::Checkbox("God Mode", &g->vehicle.god_mode);
|
||||
ImGui::Checkbox("Horn Boost", &g->vehicle.horn_boost);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
if (ImGui::Button("Repair"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
||||
|
||||
vehicle::repair(veh);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
if (ImGui::Button("Handling"))
|
||||
g->window.handling = true;
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("LS Customs"))
|
||||
{
|
||||
if (ImGui::Button("Start LS Customs"))
|
||||
{
|
||||
g->vehicle.ls_customs = true;
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Speedo Meter"))
|
||||
{
|
||||
SpeedoMeter selected = g->vehicle.speedo_meter.type;
|
||||
|
||||
ImGui::Text("Type:");
|
||||
if (ImGui::BeginCombo("###speedo_type", speedo_meters[(int)selected].name))
|
||||
{
|
||||
for (const speedo_meter& speedo : speedo_meters)
|
||||
{
|
||||
if (ImGui::Selectable(speedo.name, speedo.id == selected))
|
||||
{
|
||||
g->vehicle.speedo_meter.type = speedo.id;
|
||||
}
|
||||
|
||||
if (speedo.id == selected)
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
ImGui::Text("Position");
|
||||
|
||||
float pos[2];
|
||||
pos[0] = g->vehicle.speedo_meter.x;
|
||||
pos[1] = g->vehicle.speedo_meter.y;
|
||||
if (ImGui::SliderFloat2("###speedo_pos", pos, .001f, .999f, "%.3f"))
|
||||
{
|
||||
g->vehicle.speedo_meter.x = pos[0];
|
||||
g->vehicle.speedo_meter.y = pos[1];
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Left Sided", &g->vehicle.speedo_meter.left_side);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
#include "core/data/custom_weapons.hpp"
|
||||
#include "main_tabs.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_main::tab_weapons()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Weapons"))
|
||||
{
|
||||
if (ImGui::TreeNode("Ammo Options"))
|
||||
{
|
||||
ImGui::Checkbox("Infinite Ammo", &g->weapons.infinite_ammo);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("Infinite Clip", &g->weapons.infinite_mag);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Custom Weapons"))
|
||||
{
|
||||
CustomWeapon selected = g->weapons.custom_weapon;
|
||||
|
||||
if (ImGui::BeginCombo("Weapon", custom_weapons[(int)selected].name))
|
||||
{
|
||||
for (const custom_weapon &weapon : custom_weapons)
|
||||
{
|
||||
if (ImGui::Selectable(weapon.name, weapon.id == selected))
|
||||
{
|
||||
g->weapons.custom_weapon = weapon.id;
|
||||
}
|
||||
|
||||
if (weapon.id == selected)
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
switch (selected)
|
||||
{
|
||||
case CustomWeapon::NONE:
|
||||
break;
|
||||
case CustomWeapon::CAGE_GUN:
|
||||
break;
|
||||
case CustomWeapon::DELETE_GUN:
|
||||
break;
|
||||
case CustomWeapon::GRAVITY_GUN:
|
||||
break;
|
||||
case CustomWeapon::REPAIR_GUN:
|
||||
break;
|
||||
case CustomWeapon::VEHICLE_GUN:
|
||||
ImGui::Text("Shooting Model:");
|
||||
ImGui::InputText("##vehicle_gun_model", g->weapons.vehicle_gun_model, 12);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
#include "player_tabs.hpp"
|
||||
#include "util/misc.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_player::tab_info()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Info"))
|
||||
{
|
||||
ImGui::Checkbox("Spectate", &g->player.spectating);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("Player ID: %d", g_player_service->get_selected()->id());
|
||||
|
||||
ImGui::Text("Session Host: %s", g_player_service->get_selected()->is_host() ? "Yes" : "No");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (CPlayerInfo* player_info = g_player_service->get_selected()->get_player_info(); player_info != nullptr)
|
||||
{
|
||||
ImGui::Text("Wanted Level: %d", player_info->m_wanted_level);
|
||||
}
|
||||
|
||||
if (CPed* ped = g_player_service->get_selected()->get_ped(); ped != nullptr)
|
||||
{
|
||||
ImGui::Text("Player God Mode: %s",
|
||||
misc::has_bit_set((int*)&ped->m_damage_bits, 8) ? "Yes" : "No"
|
||||
);
|
||||
}
|
||||
|
||||
CAutomobile* vehicle = g_player_service->get_selected()->get_current_vehicle();
|
||||
ImGui::Text("Vehicle God Mode: %s",
|
||||
vehicle == nullptr ? "No vehicle detected" :
|
||||
misc::has_bit_set((int*)&vehicle->m_damage_bits, 8) ? "Yes" : "No"
|
||||
);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (rage::netPlayerData* net_player_data = g_player_service->get_selected()->get_net_data(); net_player_data != nullptr)
|
||||
{
|
||||
ImGui::Text("Rockstar ID: %d", net_player_data->m_rockstar_id);
|
||||
ImGui::Text(
|
||||
"IP Address: %d.%d.%d.%d:%d",
|
||||
net_player_data->m_external_ip.m_field1,
|
||||
net_player_data->m_external_ip.m_field2,
|
||||
net_player_data->m_external_ip.m_field3,
|
||||
net_player_data->m_external_ip.m_field4,
|
||||
net_player_data->m_external_port
|
||||
);
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
#include "imgui.h"
|
||||
#include "services/player_service.hpp"
|
||||
|
||||
namespace big::tab_player
|
||||
{
|
||||
void tab_info();
|
||||
void tab_teleport();
|
||||
void tab_toxic();
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
#include "player_tabs.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_player::tab_teleport()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Teleport"))
|
||||
{
|
||||
if (ImGui::Button("Teleport"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
teleport::to_player(g_player_service->get_selected()->id());
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Bring"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
teleport::bring_player(g_player_service->get_selected()->id());
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::Button("Teleport into Vehicle"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id()), false);
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
#include "gta_util.hpp"
|
||||
#include "player_tabs.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/toxic.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tab_player::tab_toxic()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Toxic"))
|
||||
{
|
||||
if (ImGui::Button("Explode Self"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
toxic::blame_explode_player(
|
||||
g_player_service->get_selected()->id(),
|
||||
g_player_service->get_selected()->id(),
|
||||
eExplosionType::PLANE, 1000, false, true, 0.f
|
||||
);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
#include "gui/window.hpp"
|
||||
#include "dbg/debug_tabs.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void window::debug()
|
||||
{
|
||||
if (g->window.debug && ImGui::Begin("Dev"))
|
||||
{
|
||||
ImGui::BeginTabBar("dev_tabbar");
|
||||
tab_debug::_tab_debug();
|
||||
tab_debug::tab_globals();
|
||||
tab_debug::tab_script_events();
|
||||
ImGui::EndTabBar();
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "gui/window.hpp"
|
||||
#include "handling/handling_tabs.hpp"
|
||||
#include "imgui.h"
|
||||
#include "services/vehicle_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void window::handling()
|
||||
{
|
||||
ImGui::SetNextWindowSize({ 500, 250 }, ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowPos({ 50, 50 }, ImGuiCond_FirstUseEver);
|
||||
if (g->window.handling && ImGui::Begin("Handling", &g->window.handling))
|
||||
{
|
||||
if (g_local_player == nullptr || g_local_player->m_vehicle == nullptr || g_local_player->m_ped_task_flag & (int)ePedTask::TASK_FOOT)
|
||||
{
|
||||
ImGui::Text("Please enter a vehicle.");
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
g_vehicle_service->attempt_save();
|
||||
|
||||
ImGui::BeginTabBar("handling_profiles");
|
||||
tab_handling::tab_current_profile();
|
||||
tab_handling::tab_my_profiles();
|
||||
tab_handling::tab_saved_profiles();
|
||||
tab_handling::tab_search();
|
||||
ImGui::EndTabBar();
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
#include "gui/window.hpp"
|
||||
#include "imgui.h"
|
||||
#include "main/main_tabs.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void window::main()
|
||||
{
|
||||
ImGui::SetNextWindowSize({ 800, 840 }, ImGuiCond_FirstUseEver);
|
||||
if (g->window.main && ImGui::Begin("Yimura's Mod Menu"))
|
||||
{
|
||||
ImGui::BeginTabBar("tabbar");
|
||||
tab_main::tab_self();
|
||||
tab_main::tab_mobile();
|
||||
tab_main::tab_spawn();
|
||||
tab_main::tab_tunables();
|
||||
tab_main::tab_teleport();
|
||||
tab_main::tab_vehicle();
|
||||
tab_main::tab_weapons();
|
||||
tab_main::tab_recovery();
|
||||
tab_main::tab_spoofing();
|
||||
tab_main::tab_settings();
|
||||
ImGui::EndTabBar();
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
#include "player/player_tabs.hpp"
|
||||
#include "gui/window.hpp"
|
||||
#include "imgui.h"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void window::w_player()
|
||||
{
|
||||
std::string title = fmt::format("Player Options: {}###player_options", g_player_service->get_selected()->get_name());
|
||||
|
||||
ImGui::SetNextWindowSize({ 350.f, 300.f }, ImGuiCond_FirstUseEver);
|
||||
if (g->window.player && g_player_service->get_selected()->is_valid() && ImGui::Begin(title.c_str(), &g->window.player))
|
||||
{
|
||||
ImGui::BeginTabBar("tabbar_player");
|
||||
tab_player::tab_info();
|
||||
tab_player::tab_teleport();
|
||||
tab_player::tab_toxic();
|
||||
ImGui::EndTabBar();
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "gui/window.hpp"
|
||||
#include "imgui.h"
|
||||
#include "script.hpp"
|
||||
#include "util/notify.hpp"
|
||||
#include "util/session.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void window::top_bar()
|
||||
{
|
||||
if (ImGui::BeginMainMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("Info"))
|
||||
{
|
||||
ImGui::MenuItem("Logged in as:", NULL, false, false);
|
||||
ImGui::MenuItem(g_local_player == nullptr || g_local_player->m_player_info == nullptr ? "unknown" : g_local_player->m_player_info->m_net_player_data.m_name, NULL, false, false);
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Session"))
|
||||
{
|
||||
for (const SessionType &session_type : sessions)
|
||||
{
|
||||
if (ImGui::MenuItem(session_type.name))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(&)
|
||||
{
|
||||
session::join_type(session_type);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Extra"))
|
||||
{
|
||||
if (ImGui::MenuItem("Skip Cutscene"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
}
|
||||
QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Windows"))
|
||||
{
|
||||
ImGui::MenuItem("Main", nullptr, &g->window.main);
|
||||
ImGui::MenuItem("Players", nullptr, &g->window.users);
|
||||
ImGui::MenuItem("Logs", nullptr, &g->window.log);
|
||||
ImGui::MenuItem("Debug", nullptr, &g->window.debug);
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu("Quit"))
|
||||
{
|
||||
if (ImGui::MenuItem("Unload Menu"))
|
||||
{
|
||||
g_running = false;
|
||||
}
|
||||
|
||||
if (ImGui::MenuItem("Rage Quit (hard crash)"))
|
||||
{
|
||||
g_running = false;
|
||||
|
||||
TerminateProcess(GetCurrentProcess(), 0);
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
ImGui::EndMainMenuBar();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
#include "gui/window.hpp"
|
||||
#include "imgui.h"
|
||||
#include "services/player_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void window::users()
|
||||
{
|
||||
static const float height_correction = 28.f;
|
||||
static const float width = 170.f;
|
||||
|
||||
ImGui::SetNextWindowSize({ width, (float)g->window.y - height_correction }, ImGuiCond_Always);
|
||||
ImGui::SetNextWindowPos({ g->window.x - width, height_correction }, ImGuiCond_Always);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.f);
|
||||
if (g->window.users && ImGui::Begin("###player_menu", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
ImGui::Text("Friends:");
|
||||
for (auto& item : g_player_service->m_players)
|
||||
{
|
||||
std::unique_ptr<player>& plyr = item.second;
|
||||
if (plyr->is_friend() && ImGui::Button(plyr->get_name(), { ImGui::GetWindowSize().x - 15.f, 0.f }))
|
||||
{
|
||||
g_player_service->set_selected(plyr.get());
|
||||
|
||||
g->window.player = true;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Text("Players:");
|
||||
for (auto& item : g_player_service->m_players)
|
||||
{
|
||||
std::unique_ptr<player>& plyr = item.second;
|
||||
if (!plyr->is_friend() && ImGui::Button(plyr->get_name(), { ImGui::GetWindowSize().x - 15.f, 0.f }))
|
||||
{
|
||||
g_player_service->set_selected(plyr.get());
|
||||
|
||||
g->window.player = true;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
}
|
||||
}
|
@ -45,6 +45,10 @@ namespace big
|
||||
m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 20.f, &font_cfg);
|
||||
m_monospace_font = ImGui::GetIO().Fonts->AddFontDefault();
|
||||
|
||||
g->window.font_title = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 40.f, &font_cfg);
|
||||
g->window.font_sub_title = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 30.f, &font_cfg);
|
||||
g->window.font_small = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 17.5f, &font_cfg);
|
||||
|
||||
g_gui.dx_init();
|
||||
g_renderer = this;
|
||||
}
|
||||
|
@ -17,7 +17,8 @@ namespace big
|
||||
|
||||
void wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
|
||||
public:
|
||||
ImFont *m_font;
|
||||
ImFont* m_font;
|
||||
ImFont *m_font_title;
|
||||
ImFont *m_monospace_font;
|
||||
private:
|
||||
comptr<IDXGISwapChain> m_dxgi_swapchain;
|
||||
|
32
BigBaseV2/src/util/animator.hpp
Normal file
32
BigBaseV2/src/util/animator.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
namespace big
|
||||
{
|
||||
class animator
|
||||
{
|
||||
std::chrono::time_point<std::chrono::system_clock> animation_start_time;
|
||||
std::chrono::time_point<std::chrono::system_clock> animation_current_time;
|
||||
float animation_curve(float t) {
|
||||
return 3 * pow(1.f - t, 2.f) * t +
|
||||
3 * (1.f - t) * pow(t, 2.f) +
|
||||
pow(t, 3.f);
|
||||
}
|
||||
public:
|
||||
void animate(int milliseconds, std::function<void(float&)> cb) {
|
||||
animation_current_time = std::chrono::system_clock::now();
|
||||
float timeDiff = (float)std::chrono::duration_cast<std::chrono::milliseconds>(animation_current_time - animation_start_time).count();
|
||||
float t = timeDiff / milliseconds;
|
||||
|
||||
if (t > 1) {
|
||||
t = 1;
|
||||
}
|
||||
|
||||
float progress = animation_curve(t);
|
||||
cb(progress);
|
||||
}
|
||||
|
||||
void reset() {
|
||||
animation_start_time = std::chrono::system_clock::now();
|
||||
}
|
||||
};
|
||||
}
|
71
BigBaseV2/src/views/view.hpp
Normal file
71
BigBaseV2/src/views/view.hpp
Normal file
@ -0,0 +1,71 @@
|
||||
#pragma once
|
||||
#include "imgui.h"
|
||||
#include "natives.hpp"
|
||||
#include "util/animator.hpp"
|
||||
#include "gui/components/components.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class view
|
||||
{
|
||||
enum class tabs {
|
||||
NONE,
|
||||
SELF,
|
||||
MOBILE,
|
||||
SPAWN,
|
||||
WEAPONS,
|
||||
SPOOFING,
|
||||
SETTINGS,
|
||||
TELEPORT,
|
||||
VEHICLE,
|
||||
PLAYER,
|
||||
DEBUG,
|
||||
};
|
||||
|
||||
struct navigation_struct
|
||||
{
|
||||
tabs tab = tabs::NONE;
|
||||
const char name[32] = "";
|
||||
std::function<void()> func = nullptr;
|
||||
};
|
||||
|
||||
static void self();
|
||||
static void vehicle();
|
||||
static void debug();
|
||||
static void view_player();
|
||||
static void weapons();
|
||||
static void mobile();
|
||||
static void teleport();
|
||||
static void spawn();
|
||||
static void settings();
|
||||
static void spoofing();
|
||||
static void navigation();
|
||||
static void active_view();
|
||||
|
||||
inline static animator window_animator = animator();
|
||||
|
||||
inline static navigation_struct initial_tab{};
|
||||
|
||||
inline static navigation_struct* current_tab = &initial_tab;
|
||||
|
||||
inline static navigation_struct nav[] = {
|
||||
{ tabs::SELF, "Self", view::self },
|
||||
{ tabs::MOBILE, "Mobile", view::mobile },
|
||||
{ tabs::SPAWN, "Spawn", view::spawn },
|
||||
{ tabs::TELEPORT, "Teleport", view::teleport },
|
||||
{ tabs::VEHICLE, "Vehicle", view::vehicle },
|
||||
{ tabs::WEAPONS, "Weapons", view::weapons },
|
||||
{ tabs::SPOOFING, "Spoofing", view::spoofing },
|
||||
{ tabs::SETTINGS, "Settings", view::settings },
|
||||
{ tabs::DEBUG, "Debug", view::debug },
|
||||
{ tabs::PLAYER, "Players", view::view_player },
|
||||
};
|
||||
|
||||
public:
|
||||
static void root()
|
||||
{
|
||||
active_view();
|
||||
navigation();
|
||||
}
|
||||
};
|
||||
}
|
48
BigBaseV2/src/views/view_active_view.cpp
Normal file
48
BigBaseV2/src/views/view_active_view.cpp
Normal file
@ -0,0 +1,48 @@
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::active_view() {
|
||||
static float tabs_open_animation = -(float)g->window.x * 0.15f;
|
||||
static float alpha = 0.f;
|
||||
|
||||
const float max_position = (float)g->window.x * 0.15f;
|
||||
|
||||
if (g->window.switched_view) {
|
||||
g->window.switched_view = false;
|
||||
window_animator.reset();
|
||||
}
|
||||
window_animator.animate(600, [max_position](const float& progress)
|
||||
{
|
||||
alpha = progress;
|
||||
switch (current_tab->tab)
|
||||
{
|
||||
case tabs::NONE:
|
||||
tabs_open_animation = tabs_open_animation <= -max_position ? -max_position : max_position - (((float)g->window.x * 0.30f) * progress);
|
||||
break;
|
||||
default:
|
||||
tabs_open_animation = tabs_open_animation >= max_position ? max_position : (((float)g->window.x * 0.30f) * progress) - max_position;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
ImGui::SetNextWindowPos({ tabs_open_animation, 0.f }, ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize({ (float)g->window.x * 0.3f, (float)g->window.y }, ImGuiCond_Always);
|
||||
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.10f, 0.09f, 0.12f, 1.00f));
|
||||
if (ImGui::Begin("main", 0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
||||
if (current_tab->tab != tabs::NONE)
|
||||
{
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.06f, 0.05f, 0.07f, 1.00f));
|
||||
components::sub_title(current_tab->name);
|
||||
current_tab->func();
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::End();
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
}
|
231
BigBaseV2/src/views/view_debug.cpp
Normal file
231
BigBaseV2/src/views/view_debug.cpp
Normal file
@ -0,0 +1,231 @@
|
||||
#include "views/view.hpp"
|
||||
#include "services/globals_service.hpp"
|
||||
#include "thread_pool.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/system.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::debug() {
|
||||
if (ImGui::TreeNode("Globals")) {
|
||||
if (ImGui::Checkbox("Enable Freezing", &g_globals_service->m_running) && g_globals_service->m_running)
|
||||
g_thread_pool->push([&]() { g_globals_service->loop(); });
|
||||
|
||||
if (ImGui::Button("Load"))
|
||||
g_globals_service->load();
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Save"))
|
||||
g_globals_service->save();
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Add Global"))
|
||||
{
|
||||
ImGui::OpenPopup("New Global");
|
||||
}
|
||||
|
||||
if (ImGui::BeginPopupModal("New Global"))
|
||||
{
|
||||
static int base_address = 0;
|
||||
static bool freeze = false;
|
||||
static char name[32] = "";
|
||||
static int(*offsets)[2] = nullptr;
|
||||
static int offset_count = 0;
|
||||
static int previous_offset_count = 0;
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
});
|
||||
|
||||
ImGui::Text("Name:");
|
||||
ImGui::InputText("##modal_global_name", name, sizeof(name));
|
||||
ImGui::Text("Base Address:");
|
||||
ImGui::InputInt("##modal_global_base_addr", &base_address);
|
||||
ImGui::Text("Freeze:");
|
||||
ImGui::Checkbox("##modal_global_freeze", &freeze);
|
||||
ImGui::Text("Number of Offsets:");
|
||||
ImGui::InputInt("##modal_offset_count", &offset_count);
|
||||
|
||||
if (offset_count < 0) offset_count;
|
||||
else if (offset_count > 10) offset_count = 10;
|
||||
|
||||
if (offset_count != previous_offset_count)
|
||||
{
|
||||
int(*new_offsets)[2] = new int[offset_count][2]{ 0 };
|
||||
memcpy(new_offsets, offsets, sizeof(int) * std::min(offset_count, previous_offset_count) * 2);
|
||||
|
||||
delete[] offsets;
|
||||
offsets = new_offsets;
|
||||
|
||||
previous_offset_count = offset_count;
|
||||
}
|
||||
|
||||
ImGui::PushItemWidth(320.f);
|
||||
for (int i = 0; i < offset_count; i++)
|
||||
{
|
||||
char id[32];
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("Offset: %d", i + 1);
|
||||
|
||||
sprintf(id, "##offset_%d", i);
|
||||
ImGui::InputInt(id, &offsets[i][0]);
|
||||
|
||||
ImGui::Text("Size:");
|
||||
ImGui::SameLine();
|
||||
sprintf(id, "##size_%d", i);
|
||||
ImGui::InputInt(id, &offsets[i][1]);
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (ImGui::Button("Cancel"))
|
||||
{
|
||||
strcpy(name, "");
|
||||
freeze = false;
|
||||
delete[] offsets;
|
||||
offsets = nullptr;
|
||||
offset_count = 0;
|
||||
previous_offset_count = 0;
|
||||
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Save"))
|
||||
{
|
||||
auto new_global = global(name, base_address, freeze, offsets, offset_count);
|
||||
new_global.build_cache();
|
||||
|
||||
g_globals_service->m_globals.push_back(new_global);
|
||||
|
||||
strcpy(name, "");
|
||||
freeze = false;
|
||||
delete[] offsets;
|
||||
offsets = nullptr;
|
||||
offset_count = 0;
|
||||
previous_offset_count = 0;
|
||||
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
for (auto& global : g_globals_service->m_globals)
|
||||
{
|
||||
char label[64];
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
sprintf(label, "Freeze##%d", global.get_id());
|
||||
ImGui::Checkbox(label, &global.m_freeze);
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Text("Name:");
|
||||
ImGui::Text("Value:");
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Text(global.m_name.c_str());
|
||||
|
||||
sprintf(label, "###input_%d", global.get_id());
|
||||
ImGui::SetNextItemWidth(200.f);
|
||||
ImGui::InputInt(label, global.get());
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
sprintf(label, "Delete##%d", global.get_id());
|
||||
if (ImGui::Button(label))
|
||||
{
|
||||
for (int i = 0; i < g_globals_service->m_globals.size(); i++)
|
||||
if (auto& it = g_globals_service->m_globals.at(i); it.get_id() == global.get_id())
|
||||
g_globals_service->m_globals.erase(g_globals_service->m_globals.begin() + i);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
sprintf(label, "Write###%d", global.get_id());
|
||||
if (ImGui::Button(label))
|
||||
global.write();
|
||||
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Scripting Events")) {
|
||||
static int64_t* args;
|
||||
static int event_arg_count = 1;
|
||||
static int previous_arg_count;
|
||||
static int event_player_bits;
|
||||
static bool event_everyone = false;
|
||||
|
||||
ImGui::Text("Script Argument Count:");
|
||||
ImGui::InputInt("###script_event_arg_count", &event_arg_count);
|
||||
if (event_arg_count > 32)
|
||||
event_arg_count = 32;
|
||||
else if (event_arg_count < 1)
|
||||
event_arg_count = 1;
|
||||
|
||||
if (event_arg_count != previous_arg_count)
|
||||
{
|
||||
int64_t* temp_args = new int64_t[event_arg_count]{ 0 };
|
||||
memcpy(temp_args, args, sizeof(int64_t) * std::min(event_arg_count, previous_arg_count));
|
||||
|
||||
delete[] args;
|
||||
args = temp_args;
|
||||
|
||||
previous_arg_count = event_arg_count;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
for (int i = 0; i < event_arg_count; i++)
|
||||
{
|
||||
ImGui::Text("Arg[%d]", i);
|
||||
ImGui::SameLine();
|
||||
|
||||
char input_arg_name[20];
|
||||
sprintf(input_arg_name, "###input_dynamic_arg_%d", i);
|
||||
ImGui::InputScalar(input_arg_name, ImGuiDataType_S64, &args[i]);
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Checkbox("Send to everyone", &event_everyone);
|
||||
if (!event_everyone)
|
||||
{
|
||||
ImGui::Text("Player ID:");
|
||||
ImGui::InputInt("###player_bits", &event_player_bits);
|
||||
}
|
||||
|
||||
components::button("Send Event", [] {
|
||||
g_pointers->m_trigger_script_event(1, args, event_arg_count, event_everyone ? -1 : 1 << event_player_bits);
|
||||
});
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Debug")) {
|
||||
ImGui::Checkbox("Script Event Logging", &g->debug.script_event_logging);
|
||||
|
||||
if (ImGui::Button("Dump entrypoints"))
|
||||
{
|
||||
system::dump_entry_points();
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
88
BigBaseV2/src/views/view_mobile.cpp
Normal file
88
BigBaseV2/src/views/view_mobile.cpp
Normal file
@ -0,0 +1,88 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "util/notify.hpp"
|
||||
#include "services/mobile_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::mobile() {
|
||||
components::button("Mors Mutual Fix All Vehicles", [] {
|
||||
int amount_fixed = mobile::mors_mutual::fix_all();
|
||||
notify::above_map(
|
||||
fmt::format("<C>{}</C> vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have")
|
||||
);
|
||||
});
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::TreeNode("Lester"))
|
||||
{
|
||||
ImGui::Checkbox("Off Radar", &g->self.off_radar);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::TreeNode("Mechanic - Personal Vehicles"))
|
||||
{
|
||||
static char search[64];
|
||||
static std::string lower_search;
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::SetNextItemWidth(400.f);
|
||||
if (ImGui::InputTextWithHint("##search_pv_list", "Search", search, sizeof(search)))
|
||||
{
|
||||
lower_search = search;
|
||||
std::transform(lower_search.begin(), lower_search.end(), lower_search.begin(), tolower);
|
||||
}
|
||||
|
||||
if (ImGui::ListBoxHeader("##personal_veh_list", { 400.f, 500.f }))
|
||||
{
|
||||
for (auto& it : g_mobile_service->m_personal_vehicles)
|
||||
{
|
||||
std::string label = it.first;
|
||||
auto& personal_veh = it.second;
|
||||
|
||||
std::string lower = label.c_str();
|
||||
std::transform(lower.begin(), lower.end(), lower.begin(), ::tolower);
|
||||
|
||||
if (lower.find(lower_search) != std::string::npos)
|
||||
{
|
||||
if (ImGui::Selectable(
|
||||
label.c_str(),
|
||||
personal_veh->get_id() == mobile::util::get_current_personal_vehicle()
|
||||
))
|
||||
{
|
||||
strcpy(search, "");
|
||||
lower_search = search;
|
||||
|
||||
g_fiber_pool->queue_job([&personal_veh] {
|
||||
personal_veh->summon();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
if (ImGui::Button("Load/Reload Personal Vehicles"))
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
g_mobile_service->register_vehicles();
|
||||
});
|
||||
}
|
||||
ImGui::Checkbox("Spawn in Vehicle", &g->vehicle.pv_teleport_into);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
73
BigBaseV2/src/views/view_navigation.cpp
Normal file
73
BigBaseV2/src/views/view_navigation.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
#include "views/view.hpp"
|
||||
#include "services/player_service.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::navigation() {
|
||||
ImGui::SetNextWindowPos({ 0.f, 0.f }, ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize({ (float)g->window.x * 0.15f, (float)g->window.y }, ImGuiCond_Always);
|
||||
|
||||
if (ImGui::Begin("navigation", 0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
components::title("Yim");
|
||||
ImGui::SameLine(0, 0);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.172f, 0.380f, 0.909f, 1.f));
|
||||
components::title("Menu");
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
components::small_text(fmt::format("Welcome {}", g_local_player == nullptr || g_local_player->m_player_info == nullptr ? "unknown" : g_local_player->m_player_info->m_net_player_data.m_name).c_str());
|
||||
|
||||
for (auto& navItem : nav) {
|
||||
const bool curTab = navItem.tab == current_tab->tab;
|
||||
if (curTab)
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.29f, 0.45f, 0.69f, 1.f));
|
||||
|
||||
if (components::nav_button(navItem.name)) {
|
||||
current_tab = &navItem;
|
||||
g->window.switched_view = true;
|
||||
}
|
||||
|
||||
if (curTab)
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
static navigation_struct playerPage = { tabs::PLAYER, "Player", view::view_player };
|
||||
|
||||
if (ImGui::BeginListBox("players", {(float)g->window.x * 0.15f - 30, (float)g->window.y * 0.3f})) {
|
||||
for (auto& item : g_player_service->m_players)
|
||||
{
|
||||
std::unique_ptr<player>& plyr = item.second;
|
||||
if (plyr->is_host())
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.29f, 0.45f, 0.69f, 1.f));
|
||||
if (ImGui::Button(plyr->get_name(), { ImGui::GetWindowSize().x - 15.f, 0.f }))
|
||||
{
|
||||
g_player_service->set_selected(plyr.get());
|
||||
current_tab = &playerPage;
|
||||
g->window.switched_view = true;
|
||||
}
|
||||
if (plyr->is_host())
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
ImGui::EndListBox();
|
||||
}
|
||||
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.69f, 0.29f, 0.29f, 1.00f));
|
||||
if (components::nav_button("Unload"))
|
||||
{
|
||||
g_running = false;
|
||||
}
|
||||
|
||||
if (components::nav_button("Rage Quit (hard crash)"))
|
||||
{
|
||||
g_running = false;
|
||||
|
||||
TerminateProcess(GetCurrentProcess(), 0);
|
||||
}
|
||||
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
}
|
98
BigBaseV2/src/views/view_player.cpp
Normal file
98
BigBaseV2/src/views/view_player.cpp
Normal file
@ -0,0 +1,98 @@
|
||||
#include "views/view.hpp"
|
||||
#include "util/toxic.hpp"
|
||||
#include "services/player_service.hpp"
|
||||
#include "gta_util.hpp"
|
||||
#include "util/misc.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::view_player() {
|
||||
|
||||
std::string title = fmt::format("Player Options: {}", g_player_service->get_selected()->get_name());
|
||||
|
||||
ImGui::Text(title.c_str());
|
||||
ImGui::Checkbox("Spectate", &g->player.spectating);
|
||||
|
||||
if (g_player_service->get_selected()->is_valid())
|
||||
{
|
||||
|
||||
if (ImGui::TreeNode("Info")) {
|
||||
|
||||
ImGui::Text("Player ID: %d", g_player_service->get_selected()->id());
|
||||
|
||||
ImGui::Text("Session Host: %s", g_player_service->get_selected()->is_host() ? "Yes" : "No");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (CPlayerInfo* player_info = g_player_service->get_selected()->get_player_info(); player_info != nullptr)
|
||||
{
|
||||
ImGui::Text("Wanted Level: %d", player_info->m_wanted_level);
|
||||
}
|
||||
|
||||
if (CPed* ped = g_player_service->get_selected()->get_ped(); ped != nullptr)
|
||||
{
|
||||
ImGui::Text("Player God Mode: %s",
|
||||
misc::has_bit_set((int*)&ped->m_damage_bits, 8) ? "Yes" : "No"
|
||||
);
|
||||
}
|
||||
|
||||
CAutomobile* vehicle = g_player_service->get_selected()->get_current_vehicle();
|
||||
ImGui::Text("Vehicle God Mode: %s",
|
||||
vehicle == nullptr ? "No vehicle detected" :
|
||||
misc::has_bit_set((int*)&vehicle->m_damage_bits, 8) ? "Yes" : "No"
|
||||
);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (rage::netPlayerData* net_player_data = g_player_service->get_selected()->get_net_data(); net_player_data != nullptr)
|
||||
{
|
||||
ImGui::Text("Rockstar ID: %d", net_player_data->m_rockstar_id);
|
||||
ImGui::Text(
|
||||
"IP Address: %d.%d.%d.%d:%d",
|
||||
net_player_data->m_external_ip.m_field1,
|
||||
net_player_data->m_external_ip.m_field2,
|
||||
net_player_data->m_external_ip.m_field3,
|
||||
net_player_data->m_external_ip.m_field4,
|
||||
net_player_data->m_external_port
|
||||
);
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Teleport")) {
|
||||
|
||||
components::button("Teleport", [] {
|
||||
teleport::to_player(g_player_service->get_selected()->id());
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Bring", [] {
|
||||
teleport::bring_player(g_player_service->get_selected()->id());
|
||||
});
|
||||
|
||||
components::button("Teleport into Vehicle", [] {
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id()), false);
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
});
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Toxic")) {
|
||||
components::button("Explode Self", [] {
|
||||
toxic::blame_explode_player(
|
||||
g_player_service->get_selected()->id(),
|
||||
g_player_service->get_selected()->id(),
|
||||
eExplosionType::PLANE, 1000, false, true, 0.f
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
128
BigBaseV2/src/views/view_self.cpp
Normal file
128
BigBaseV2/src/views/view_self.cpp
Normal file
@ -0,0 +1,128 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "script.hpp"
|
||||
#include "script_global.hpp"
|
||||
#include "util/entity.hpp"
|
||||
#include "util/player.hpp"
|
||||
#include "util/notify.hpp"
|
||||
#include "util/session.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::self() {
|
||||
components::button("Suicide", [] {
|
||||
ENTITY::SET_ENTITY_HEALTH(PLAYER::PLAYER_PED_ID(), 0, 0);
|
||||
});
|
||||
|
||||
if (ImGui::TreeNode("General"))
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("God Mode", &g->self.godmode);
|
||||
ImGui::Checkbox("Off Radar", &g->self.off_radar);
|
||||
ImGui::Checkbox("Free Cam", &g->self.free_cam);
|
||||
ImGui::Checkbox("Disable Phone", &g->tunables.disable_phone);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("No Clip", &g->self.noclip);
|
||||
ImGui::Checkbox("No Ragdoll", &g->self.no_ragdoll);
|
||||
ImGui::Checkbox("Super Run", &g->self.super_run);
|
||||
ImGui::Checkbox("No Idle Kick", &g->tunables.no_idle_kick);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Frame Flags"))
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Explosive Ammo", &g->self.frame_flags.explosive_ammo);
|
||||
ImGui::Checkbox("Fire Ammo", &g->self.frame_flags.fire_ammo);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Explosive Melee", &g->self.frame_flags.explosive_melee);
|
||||
ImGui::Checkbox("Super Jump", &g->self.frame_flags.super_jump);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Player Model"))
|
||||
{
|
||||
static char model[32];
|
||||
|
||||
g_fiber_pool->queue_job([] {
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
});
|
||||
|
||||
if (
|
||||
ImGui::InputText("Model Name###player_ped_model", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) ||
|
||||
components::button("Set Player Model###spawn_player_ped_model")
|
||||
)
|
||||
{
|
||||
g_fiber_pool->queue_job([] {Hash hash = rage::joaat(model);
|
||||
|
||||
for (uint8_t i = 0; !STREAMING::HAS_MODEL_LOADED(hash) && i < 100; i++)
|
||||
{
|
||||
STREAMING::REQUEST_MODEL(hash);
|
||||
|
||||
script::get_current()->yield();
|
||||
}
|
||||
if (!STREAMING::HAS_MODEL_LOADED(hash))
|
||||
{
|
||||
notify::above_map("~r~Failed to spawn model, did you give an incorrect model?");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
PLAYER::SET_PLAYER_MODEL(PLAYER::GET_PLAYER_INDEX(), hash);
|
||||
PED::SET_PED_DEFAULT_COMPONENT_VARIATION(PLAYER::PLAYER_PED_ID());
|
||||
script::get_current()->yield();
|
||||
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash);
|
||||
});
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Police"))
|
||||
{
|
||||
ImGui::Checkbox("Never Wanted", &g->self.never_wanted);
|
||||
|
||||
if (!g->self.never_wanted)
|
||||
{
|
||||
ImGui::Checkbox("Force Wanted Level", &g->self.force_wanted_level);
|
||||
ImGui::Text("Wanted Level");
|
||||
if (ImGui::SliderInt("###wanted_level", &g->self.wanted_level, 0, 5) && !g->self.force_wanted_level)
|
||||
g_local_player->m_player_info->m_wanted_level = g->self.wanted_level;
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Extra's")) {
|
||||
|
||||
components::button("Skip Cutscene", [] {
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
});
|
||||
|
||||
ImGui::Text("Session");
|
||||
for (const SessionType& session_type : sessions)
|
||||
{
|
||||
components::button(session_type.name, [session_type] {
|
||||
session::join_type(session_type);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
47
BigBaseV2/src/views/view_settings.cpp
Normal file
47
BigBaseV2/src/views/view_settings.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
#include "views/view.hpp"
|
||||
#include "widgets/imgui_hotkey.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::settings() {
|
||||
if (ImGui::TreeNode("Hotkeys"))
|
||||
{
|
||||
ImGui::PushItemWidth(350.f);
|
||||
|
||||
if (ImGui::Hotkey("Menu Toggle", &g->settings.hotkeys.menu_toggle))
|
||||
g->settings.hotkeys.editing_menu_toggle = true; // make our menu reappear
|
||||
|
||||
ImGui::Text("(Below hotkey is not implemented)");
|
||||
ImGui::Hotkey("Teleport to waypoint", &g->settings.hotkeys.teleport_waypoint);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Protections"))
|
||||
{
|
||||
ImGui::Checkbox("Bounty", &g->protections.script_events.bounty);
|
||||
ImGui::Checkbox("CEO Ban", &g->protections.script_events.ceo_ban);
|
||||
ImGui::Checkbox("CEO Kick", &g->protections.script_events.ceo_kick);
|
||||
ImGui::Checkbox("CEO Money", &g->protections.script_events.ceo_money);
|
||||
ImGui::Checkbox("Wanted Level", &g->protections.script_events.clear_wanted_level);
|
||||
ImGui::Checkbox("Fake Deposit", &g->protections.script_events.fake_deposit);
|
||||
ImGui::Checkbox("Force Mission", &g->protections.script_events.force_mission);
|
||||
ImGui::Checkbox("Force Teleport", &g->protections.script_events.force_teleport);
|
||||
ImGui::Checkbox("GTA Banner", &g->protections.script_events.gta_banner);
|
||||
ImGui::Checkbox("Network Bail", &g->protections.script_events.network_bail);
|
||||
ImGui::Checkbox("Destroy Personal Vehicle", &g->protections.script_events.personal_vehicle_destroyed);
|
||||
ImGui::Checkbox("Remote Off Radar", &g->protections.script_events.remote_off_radar);
|
||||
ImGui::Checkbox("Rotate Cam", &g->protections.script_events.rotate_cam);
|
||||
ImGui::Checkbox("Send to Cutscene", &g->protections.script_events.send_to_cutscene);
|
||||
ImGui::Checkbox("Send to Island", &g->protections.script_events.send_to_island);
|
||||
ImGui::Checkbox("Sound Spam", &g->protections.script_events.sound_spam);
|
||||
ImGui::Checkbox("Spectate", &g->protections.script_events.spectate);
|
||||
ImGui::Checkbox("Transaction Error", &g->protections.script_events.transaction_error);
|
||||
ImGui::Checkbox("Vehicle Kick", &g->protections.script_events.vehicle_kick);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
29
BigBaseV2/src/views/view_spawn.cpp
Normal file
29
BigBaseV2/src/views/view_spawn.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static char model[12];
|
||||
|
||||
void view::spawn() {
|
||||
g_fiber_pool->queue_job([] {
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
});
|
||||
|
||||
if (
|
||||
ImGui::InputText("Model Name", model, sizeof(model), ImGuiInputTextFlags_EnterReturnsTrue) ||
|
||||
ImGui::Button("Spawn")
|
||||
)
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(PLAYER::GET_PLAYER_INDEX());
|
||||
Vector3 location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, .0, 8.0, .5);
|
||||
|
||||
vehicle::spawn((const char*)model, location, ENTITY::GET_ENTITY_HEADING(player) + 90.f);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
59
BigBaseV2/src/views/view_spoofing.cpp
Normal file
59
BigBaseV2/src/views/view_spoofing.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::spoofing()
|
||||
{
|
||||
components::small_text("To spoof any of the below credentials you need to reconnect with the lobby.");
|
||||
|
||||
if (ImGui::TreeNode("Username"))
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
});
|
||||
|
||||
ImGui::Checkbox("Spoof Username", &g->spoofing.spoof_username);
|
||||
|
||||
static char name[20];
|
||||
strcpy_s(name, sizeof(name), g->spoofing.username.c_str());
|
||||
|
||||
ImGui::Text("Username:");
|
||||
ImGui::InputText("##username_input", name, sizeof(name));
|
||||
|
||||
if (name != g->spoofing.username)
|
||||
g->spoofing.username = std::string(name);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("IP Address"))
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
});
|
||||
|
||||
ImGui::Checkbox("Spoof IP", &g->spoofing.spoof_ip);
|
||||
|
||||
ImGui::Text("IP Address:");
|
||||
ImGui::DragInt4("##ip_fields", g->spoofing.ip_address, 0, 255);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Rockstar ID"))
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
||||
});
|
||||
|
||||
ImGui::Checkbox("Spoof Rockstar ID", &g->spoofing.spoof_rockstar_id);
|
||||
|
||||
ImGui::Text("Rockstar ID:");
|
||||
ImGui::InputScalar("##rockstar_id_input", ImGuiDataType_U64, &g->spoofing.rockstar_id);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
47
BigBaseV2/src/views/view_teleport.cpp
Normal file
47
BigBaseV2/src/views/view_teleport.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/globals.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::teleport() {
|
||||
|
||||
ImGui::Text("Blips:");
|
||||
|
||||
components::button("Waypoint", [] {
|
||||
teleport::to_waypoint();
|
||||
});
|
||||
|
||||
components::button("Objective", [] {
|
||||
static const int blips[] = { 1, 57, 128, 129, 130, 143, 144, 145, 146, 271, 286, 287, 288 };
|
||||
for (int i = 0; i < (sizeof(blips) / sizeof(*blips)); i++) {
|
||||
if (teleport::to_blip(blips[i], 5)) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::Text("Vehicles:");
|
||||
|
||||
components::button("Bring Personal Vehicle", [] {
|
||||
Vehicle veh = globals::get_personal_vehicle();
|
||||
if (ENTITY::IS_ENTITY_DEAD(veh, false)) return notify::above_map("Invalid vehicle handle...");
|
||||
|
||||
Vector3 location = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true);
|
||||
|
||||
vehicle::bring(veh, location);
|
||||
});
|
||||
|
||||
components::button("Teleport to Personal Vehicle", [] {
|
||||
Vehicle veh = globals::get_personal_vehicle();
|
||||
if (ENTITY::IS_ENTITY_DEAD(veh, false)) return notify::above_map("Invalid vehicle handle...");
|
||||
|
||||
teleport::to_coords(
|
||||
ENTITY::GET_ENTITY_COORDS(veh, true)
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
105
BigBaseV2/src/views/view_vehicle.cpp
Normal file
105
BigBaseV2/src/views/view_vehicle.cpp
Normal file
@ -0,0 +1,105 @@
|
||||
#include "views/view.hpp"
|
||||
#include "core/data/speedo_meters.hpp"
|
||||
#include "gui/handling/handling_tabs.hpp"
|
||||
#include "script.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::vehicle() {
|
||||
if (ImGui::TreeNode("General"))
|
||||
{
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Can Be Targeted", &g->vehicle.is_targetable);
|
||||
ImGui::Checkbox("God Mode", &g->vehicle.god_mode);
|
||||
ImGui::Checkbox("Horn Boost", &g->vehicle.horn_boost);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
components::button("Repair", [] {
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
||||
|
||||
vehicle::repair(veh);
|
||||
});
|
||||
|
||||
if (components::button("Handling")) {
|
||||
ImGui::OpenPopup("Handling Popup");
|
||||
}
|
||||
|
||||
bool enabled = true;
|
||||
|
||||
ImGui::SetNextWindowSize({ (float)g->window.x * 0.5f, (float)g->window.y * 0.5f }, ImGuiCond_FirstUseEver);
|
||||
if (ImGui::BeginPopupModal("Handling Popup", &enabled, ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
if (g_local_player == nullptr || g_local_player->m_vehicle == nullptr || g_local_player->m_ped_task_flag & (int)ePedTask::TASK_FOOT)
|
||||
{
|
||||
ImGui::Text("Please enter a vehicle.");
|
||||
ImGui::EndPopup();
|
||||
return;
|
||||
}
|
||||
g_vehicle_service->attempt_save();
|
||||
|
||||
ImGui::BeginTabBar("handling_profiles");
|
||||
tab_handling::tab_current_profile();
|
||||
tab_handling::tab_my_profiles();
|
||||
tab_handling::tab_saved_profiles();
|
||||
tab_handling::tab_search();
|
||||
ImGui::EndTabBar();
|
||||
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("LS Customs"))
|
||||
{
|
||||
components::button("Start LS Customs", [] {
|
||||
g->vehicle.ls_customs = true;
|
||||
});
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Speedo Meter"))
|
||||
{
|
||||
SpeedoMeter selected = g->vehicle.speedo_meter.type;
|
||||
|
||||
ImGui::Text("Type:");
|
||||
if (ImGui::BeginCombo("###speedo_type", speedo_meters[(int)selected].name))
|
||||
{
|
||||
for (const speedo_meter& speedo : speedo_meters)
|
||||
{
|
||||
if (ImGui::Selectable(speedo.name, speedo.id == selected))
|
||||
{
|
||||
g->vehicle.speedo_meter.type = speedo.id;
|
||||
}
|
||||
|
||||
if (speedo.id == selected)
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
ImGui::Text("Position");
|
||||
|
||||
float pos[2];
|
||||
pos[0] = g->vehicle.speedo_meter.x;
|
||||
pos[1] = g->vehicle.speedo_meter.y;
|
||||
if (ImGui::SliderFloat2("###speedo_pos", pos, .001f, .999f, "%.3f"))
|
||||
{
|
||||
g->vehicle.speedo_meter.x = pos[0];
|
||||
g->vehicle.speedo_meter.y = pos[1];
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Left Sided", &g->vehicle.speedo_meter.left_side);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
60
BigBaseV2/src/views/view_weapons.cpp
Normal file
60
BigBaseV2/src/views/view_weapons.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
#include "core/data/custom_weapons.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::weapons() {
|
||||
if (ImGui::TreeNode("Ammo Options"))
|
||||
{
|
||||
ImGui::Checkbox("Infinite Ammo", &g->weapons.infinite_ammo);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("Infinite Clip", &g->weapons.infinite_mag);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Custom Weapons"))
|
||||
{
|
||||
CustomWeapon selected = g->weapons.custom_weapon;
|
||||
|
||||
if (ImGui::BeginCombo("Weapon", custom_weapons[(int)selected].name))
|
||||
{
|
||||
for (const custom_weapon& weapon : custom_weapons)
|
||||
{
|
||||
if (ImGui::Selectable(weapon.name, weapon.id == selected))
|
||||
{
|
||||
g->weapons.custom_weapon = weapon.id;
|
||||
}
|
||||
|
||||
if (weapon.id == selected)
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
switch (selected)
|
||||
{
|
||||
case CustomWeapon::NONE:
|
||||
break;
|
||||
case CustomWeapon::CAGE_GUN:
|
||||
break;
|
||||
case CustomWeapon::DELETE_GUN:
|
||||
break;
|
||||
case CustomWeapon::GRAVITY_GUN:
|
||||
break;
|
||||
case CustomWeapon::REPAIR_GUN:
|
||||
break;
|
||||
case CustomWeapon::VEHICLE_GUN:
|
||||
ImGui::Text("Shooting Model:");
|
||||
ImGui::InputText("##vehicle_gun_model", g->weapons.vehicle_gun_model, 12);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user