feat(GUI): Added Main Window and Tab Self
This commit is contained in:
parent
54ed9ad4e4
commit
e7818b5159
BIN
BigBaseV2.lnk
BIN
BigBaseV2.lnk
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,20 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "structs/player.hpp"
|
||||
#include "structs/temp.hpp"
|
||||
|
||||
namespace big::features
|
||||
{
|
||||
inline Player g_playerId;
|
||||
inline Player g_selectedPlayer = -1;
|
||||
inline player g_players[32];
|
||||
|
||||
// Screen Width & Height
|
||||
inline int x, y;
|
||||
|
||||
// Temporary Variable struct
|
||||
inline temp g_temp = temp{};
|
||||
|
||||
void run_tick();
|
||||
void script_func();
|
||||
}
|
||||
|
@ -99,13 +99,8 @@ namespace big
|
||||
{
|
||||
TRY_CLAUSE
|
||||
{
|
||||
if (ImGui::Begin("BigBaseV2"))
|
||||
{
|
||||
ImGui::BeginTabBar("tabbar");
|
||||
base_tab::render_base_tab();
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
ImGui::End();
|
||||
// gui/main_window.cpp
|
||||
render_main_window();
|
||||
}
|
||||
EXCEPT_CLAUSE
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ namespace big
|
||||
void script_init();
|
||||
void script_on_tick();
|
||||
static void script_func();
|
||||
|
||||
void render_main_window();
|
||||
public:
|
||||
bool m_opened{};
|
||||
};
|
||||
|
18
BigBaseV2/src/gui/main_window.cpp
Normal file
18
BigBaseV2/src/gui/main_window.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "common.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "imgui.h"
|
||||
#include "tab_bar/tab_bar.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void gui::render_main_window()
|
||||
{
|
||||
if (ImGui::Begin("Yimura's Mod Menu"))
|
||||
{
|
||||
ImGui::BeginTabBar("tabbar");
|
||||
tabbar::render_self();
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
20
BigBaseV2/src/gui/tab_bar/tab_bar.hpp
Normal file
20
BigBaseV2/src/gui/tab_bar/tab_bar.hpp
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "imgui.h"
|
||||
#include "features.hpp"
|
||||
#include "settings.h"
|
||||
#include "natives.hpp"
|
||||
#include "script.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
using namespace features;
|
||||
|
||||
class tabbar
|
||||
{
|
||||
public:
|
||||
static void render_self();
|
||||
};
|
||||
|
||||
}
|
104
BigBaseV2/src/gui/tab_bar/tab_self.cpp
Normal file
104
BigBaseV2/src/gui/tab_bar/tab_self.cpp
Normal file
@ -0,0 +1,104 @@
|
||||
#pragma once
|
||||
#include "tab_bar.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void tabbar::render_self()
|
||||
{
|
||||
if (ImGui::BeginTabItem("Self"))
|
||||
{
|
||||
if (ImGui::Button("Heal Self"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Entity player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
|
||||
ENTITY::SET_ENTITY_HEALTH(player, ENTITY::GET_ENTITY_MAX_HEALTH(player), 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::Button("Suicide (Health)"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
ENTITY::SET_ENTITY_HEALTH(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), 0, 0);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Checkbox("God Mode", g_settings.options["god_mode"].get<bool*>())
|
||||
|| ImGui::Checkbox("No Ragdoll", g_settings.options["ragdoll"].get<bool*>())
|
||||
|| ImGui::Checkbox("Off-Radar", g_settings.options["off_radar"].get<bool*>())
|
||||
) g_settings.save();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Checkbox("Super Sprint", g_settings.options["super_sprint"].get<bool*>()))
|
||||
g_settings.save();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Clean Player Model"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Ped pedPlayer = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(PLAYER::PLAYER_ID());
|
||||
|
||||
PED::CLEAR_PED_BLOOD_DAMAGE(pedPlayer);
|
||||
PED::RESET_PED_VISIBLE_DAMAGE(pedPlayer);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
if (ImGui::Button("Reset Mental State"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
STATS::STAT_SET_FLOAT(MISC::GET_HASH_KEY("MP_PLAYER_MENTAL_STATE"), 0.0f, true);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Clear Wanted Level"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
PLAYER::CLEAR_PLAYER_WANTED_LEVEL(g_playerId);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
if (ImGui::Button("Cops Ignore"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
if (PLAYER::GET_PLAYER_WANTED_LEVEL(g_playerId) > 0)
|
||||
{
|
||||
PLAYER::CLEAR_PLAYER_WANTED_LEVEL(g_playerId);
|
||||
}
|
||||
PLAYER::SET_POLICE_IGNORE_PLAYER(g_playerId, true);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Never Wanted", g_settings.options["never_wanted"].get<bool*>()))
|
||||
g_settings.save();
|
||||
|
||||
if (!g_settings.options["never_wanted"].get<bool>())
|
||||
{
|
||||
if (ImGui::SliderInt("Wanted Level", &g_temp.wanted_level, 0, 5))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL(g_playerId, g_temp.wanted_level, true);
|
||||
PLAYER::SET_PLAYER_WANTED_LEVEL_NOW(g_playerId, true);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_temp.wanted_level = 0;
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -13,10 +13,11 @@ namespace big
|
||||
nlohmann::json options;
|
||||
nlohmann::json default_options =
|
||||
R"({
|
||||
"demo bool": false,
|
||||
"demo int": 1,
|
||||
"demo double": 1.0,
|
||||
"demo combo": 0
|
||||
"god_mode": false,
|
||||
"never_wanted": false,
|
||||
"off_radar": false,
|
||||
"ragdoll": false,
|
||||
"super_sprint": false
|
||||
})"_json;
|
||||
|
||||
bool save()
|
||||
|
11
BigBaseV2/src/structs/player.hpp
Normal file
11
BigBaseV2/src/structs/player.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
namespace big
|
||||
{
|
||||
struct player
|
||||
{
|
||||
char name[64] = "";
|
||||
bool is_friend = false;
|
||||
bool is_online = false;
|
||||
};
|
||||
}
|
15
BigBaseV2/src/structs/temp.hpp
Normal file
15
BigBaseV2/src/structs/temp.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
namespace big
|
||||
{
|
||||
struct temp
|
||||
{
|
||||
struct game_time
|
||||
{
|
||||
int hour = 0;
|
||||
int minutes = 0;
|
||||
};
|
||||
int spoofed_rank = 0;
|
||||
int wanted_level = 0;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user