feat: TP on top error fix & Manual Teleport & Infractions in player list & Max Performance (#1394)
This commit is contained in:
parent
59f948c6fc
commit
5f7b3569d3
@ -62,7 +62,7 @@ namespace big
|
||||
};
|
||||
|
||||
speedo_meter
|
||||
g_speedo_meter("speedometer", "Enabled", "Enable/disable the speedo meter for vehicles.", g.vehicle.speedo_meter.enabled);
|
||||
g_speedo_meter("speedometer", "Speedometer", "Enable/disable the speedo meter for vehicles.", g.vehicle.speedo_meter.enabled);
|
||||
bool_command g_speedo_meter_gears("speedometergears", "Show current gear", "Adds the current gear the vehicle is in to the speedo meter.",
|
||||
g.vehicle.speedo_meter.show_current_gear);
|
||||
bool_command g_speedo_meter_left_side("speedometerleftside", "Align to left", "Aligns the speedo meter text to the left instead of to the right.",
|
||||
|
@ -45,7 +45,6 @@ namespace big
|
||||
|
||||
SETTINGS,
|
||||
LUA_SCRIPTS,
|
||||
CONTEXT_MENU_SETTINGS,
|
||||
ESP_SETTINGS,
|
||||
GTA_CACHE_SETTINGS,
|
||||
GUI_SETTINGS,
|
||||
@ -149,7 +148,6 @@ namespace big
|
||||
view::settings,
|
||||
{
|
||||
{tabs::LUA_SCRIPTS, {"GUI_TAB_LUA_SCRIPTS", view::lua_scripts}},
|
||||
{tabs::CONTEXT_MENU_SETTINGS, {"GUI_TAB_CONTEXT_MENU", view::context_menu_settings}},
|
||||
{tabs::ESP_SETTINGS, {"GUI_TAB_ESP", view::esp_settings}},
|
||||
{tabs::GTA_CACHE_SETTINGS, {"GTA Cache", view::gta_cache}},
|
||||
{tabs::GUI_SETTINGS, {"GUI_TAB_GUI", view::gui_settings}},
|
||||
|
@ -177,9 +177,9 @@ namespace big::teleport
|
||||
if (!ENTITY::DOES_ENTITY_EXIST(ent))
|
||||
return false;
|
||||
|
||||
Vector3 ent_dimensions_max{}, ent_pos{};
|
||||
Vector3 ent_dimensions_max{}, ent_dimensions_min{}, ent_pos{};
|
||||
|
||||
MISC::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(ent), nullptr, &ent_dimensions_max);
|
||||
MISC::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(ent), &ent_dimensions_min, &ent_dimensions_max);
|
||||
ent_pos = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ent, 0, 0, ent_dimensions_max.z);
|
||||
ENTITY::SET_ENTITY_COORDS_NO_OFFSET(self::ped, ent_pos.x, ent_pos.y, ent_pos.z, 0, 0, 0);
|
||||
|
||||
|
@ -611,6 +611,23 @@ namespace big::vehicle
|
||||
}
|
||||
}
|
||||
|
||||
inline void max_vehicle_performance(Vehicle veh)
|
||||
{
|
||||
if(entity::take_control_of(veh))
|
||||
{
|
||||
VehicleModType perfomance_mods[] = {MOD_ENGINE, MOD_BRAKES, MOD_TRANSMISSION, MOD_SUSPENSION, MOD_ARMOR, MOD_NITROUS, MOD_TURBO};
|
||||
VEHICLE::SET_VEHICLE_MOD_KIT(veh, 0);
|
||||
|
||||
for(auto mod_slot : perfomance_mods)
|
||||
{
|
||||
if(mod_slot != MOD_NITROUS && mod_slot != MOD_TURBO)
|
||||
VEHICLE::SET_VEHICLE_MOD(veh, mod_slot, VEHICLE::GET_NUM_VEHICLE_MODS(veh, mod_slot) -1, true);
|
||||
else
|
||||
VEHICLE::TOGGLE_VEHICLE_MOD(veh, mod_slot, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline void set_engine_state(Vehicle current_vehicle, bool state, bool immediately, bool disable_auto_start)
|
||||
{
|
||||
if (current_vehicle)
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "natives.hpp"
|
||||
#include "pointers.hpp"
|
||||
#include "services/gui/gui_service.hpp"
|
||||
#include "services/player_database/player_database_service.hpp"
|
||||
#include "services/players/player_service.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
@ -52,6 +53,19 @@ namespace big
|
||||
g_gui_service->set_selected(tabs::PLAYER);
|
||||
g.window.switched_view = true;
|
||||
}
|
||||
if (ImGui::IsItemHovered() && g_player_database_service->get_player_by_rockstar_id(plyr->get_net_data()->m_gamer_handle.m_rockstar_id) != nullptr)
|
||||
{
|
||||
auto sorted_player = g_player_database_service->get_player_by_rockstar_id(plyr->get_net_data()->m_gamer_handle.m_rockstar_id);
|
||||
|
||||
if (!sorted_player->infractions.empty())
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
for (auto infraction : sorted_player->infractions)
|
||||
ImGui::BulletText(infraction_desc[(Infraction)infraction]);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::PopID();
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
@ -84,7 +98,8 @@ namespace big
|
||||
if (ImGui::Begin("playerlist", nullptr, window_flags))
|
||||
{
|
||||
float window_height = (ImGui::CalcTextSize("A").y + ImGui::GetStyle().ItemInnerSpacing.y * 2 + 6.0f) * player_count + 10.0f;
|
||||
window_height = window_height + window_pos > (float)*g_pointers->m_gta.m_resolution_y - 10.f ? (float)*g_pointers->m_gta.m_resolution_y - (window_pos + 40.f) : window_height;
|
||||
window_height =
|
||||
window_height + window_pos > (float)*g_pointers->m_gta.m_resolution_y - 10.f ? (float)*g_pointers->m_gta.m_resolution_y - (window_pos + 40.f) : window_height;
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_FrameBg, {0.f, 0.f, 0.f, 0.f});
|
||||
ImGui::PushStyleColor(ImGuiCol_ScrollbarBg, {0.f, 0.f, 0.f, 0.f});
|
||||
|
@ -35,6 +35,10 @@ namespace big
|
||||
components::command_checkbox<"nophone">();
|
||||
components::command_checkbox<"infoxy">();
|
||||
components::command_checkbox<"fastrespawn">();
|
||||
components::command_checkbox<"invis">();
|
||||
if (g.self.invisibility)
|
||||
components::command_checkbox<"localvis">(); // TODO: does nothing in SP
|
||||
components::command_checkbox<"nocollision">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
@ -49,22 +53,19 @@ namespace big
|
||||
components::command_checkbox<"beastjump">();
|
||||
if (!g.self.beast_jump)
|
||||
components::command_checkbox<"superjump">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
components::command_checkbox<"invis">();
|
||||
if (g.self.invisibility)
|
||||
components::command_checkbox<"localvis">(); // TODO: does nothing in SP
|
||||
components::command_checkbox<"cleanloop">();
|
||||
components::command_checkbox<"nocollision">();
|
||||
components::command_checkbox<"mobileradio">();
|
||||
components::command_checkbox<"superman">();
|
||||
|
||||
ImGui::Checkbox("DANCE_MODE"_T.data(), &g.self.dance_mode);
|
||||
|
||||
components::command_checkbox<"orbitaldrone">();
|
||||
components::options_modal("Orbital drone", []{
|
||||
components::options_modal("Orbital drone", [] {
|
||||
ImGui::Separator();
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Text("ORBITAL_DRONE_USAGE_DESCR"_T.data());
|
||||
@ -86,13 +87,47 @@ namespace big
|
||||
ImGui::EndGroup();
|
||||
});
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::Checkbox("SETTINGS_CONTEXT_MENU"_T.data(), &g.context_menu.enabled);
|
||||
components::options_modal("SETTINGS_CONTEXT_MENU"_T.data(), [] {
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_ENTITY_TYPES"_T.data());
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_OBJECT"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::OBJECT));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_PED"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::PED));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_PLAYER"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::PLAYER));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_VEHICLE"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::VEHICLE));
|
||||
|
||||
components::sub_title("PTFX Styles");
|
||||
static ImVec4 selected_option_color = ImGui::ColorConvertU32ToFloat4(g.context_menu.selected_option_color);
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###BSelected Option Color##cm_picker", (float*)&selected_option_color, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.context_menu.selected_option_color = ImGui::ColorConvertFloat4ToU32(selected_option_color);
|
||||
}
|
||||
|
||||
ImGui::Checkbox("SETTINGS_CONTEXT_MENU_BOUNDING_BOX"_T.data(), &g.context_menu.bounding_box_enabled);
|
||||
|
||||
if (g.context_menu.bounding_box_enabled)
|
||||
{
|
||||
static ImVec4 bounding_box_color = ImGui::ColorConvertU32ToFloat4(g.context_menu.bounding_box_color);
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_BOUNDING_BOX_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###Bounding Box Color##cm_picker", (float*)&bounding_box_color, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.context_menu.bounding_box_color = ImGui::ColorConvertFloat4ToU32(bounding_box_color);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
components::command_checkbox<"ptfx">();
|
||||
if (g.self.ptfx_effects.show)
|
||||
{
|
||||
components::options_modal("PTFX", [] {
|
||||
ImGui::SliderFloat("PTFX Size", &g.self.ptfx_effects.size, 0.1f, 2.f);
|
||||
if (ImGui::BeginCombo("Asset", ptfx_named[g.self.ptfx_effects.select].friendly_name))
|
||||
{
|
||||
@ -125,8 +160,26 @@ namespace big
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
|
||||
components::options_modal("Police", [] {
|
||||
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
|
||||
components::command_button<"clearwantedlvl">();
|
||||
if (!g.self.never_wanted)
|
||||
{
|
||||
ImGui::Checkbox("FORCE_WANTED_LVL"_T.data(), &g.self.force_wanted_level);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("FORCE_WANTED_LVL_INFO"_T.data());
|
||||
ImGui::Text("WANTED_LVL"_T.data());
|
||||
if (ImGui::SliderInt("###wanted_level", &g.self.wanted_level, 0, 5) && !g.self.force_wanted_level && g_local_player != nullptr)
|
||||
{
|
||||
g_local_player->m_player_info->m_wanted_level = g.self.wanted_level;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
@ -188,26 +241,6 @@ namespace big
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("POLICE"_T);
|
||||
|
||||
components::command_button<"clearwantedlvl">();
|
||||
|
||||
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
|
||||
|
||||
if (!g.self.never_wanted)
|
||||
{
|
||||
ImGui::Checkbox("FORCE_WANTED_LVL"_T.data(), &g.self.force_wanted_level);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("FORCE_WANTED_LVL_INFO"_T.data());
|
||||
ImGui::Text("WANTED_LVL"_T.data());
|
||||
if (ImGui::SliderInt("###wanted_level", &g.self.wanted_level, 0, 5) && !g.self.force_wanted_level && g_local_player != nullptr)
|
||||
{
|
||||
g_local_player->m_player_info->m_wanted_level = g.self.wanted_level;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("HUD"_T);
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
@ -10,21 +10,80 @@ namespace big
|
||||
{
|
||||
void view::teleport()
|
||||
{
|
||||
ImGui::Text("BLIPS"_T.data());
|
||||
components::sub_title("BLIPS"_T.data());
|
||||
ImGui::Spacing();
|
||||
|
||||
components::command_button<"waypointtp">({}, "Waypoint");
|
||||
ImGui::SameLine();
|
||||
components::command_button<"objectivetp">({}, "Objective");
|
||||
components::command_checkbox<"autotptowp">();
|
||||
|
||||
ImGui::Text("VEHICLES"_T.data());
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("Movement");
|
||||
ImGui::Spacing();
|
||||
|
||||
static float new_location[3];
|
||||
static float increment = 1;
|
||||
|
||||
components::small_text("Custom teleport");
|
||||
ImGui::SetNextItemWidth(200);
|
||||
ImGui::InputFloat3("##Customlocation", new_location);
|
||||
ImGui::SameLine();
|
||||
components::button("Teleport", [] {
|
||||
teleport::teleport_player_to_coords(g_player_service->get_self(), {new_location[0], new_location[1], new_location[2]});
|
||||
});
|
||||
|
||||
ImGui::Spacing();
|
||||
components::small_text("Specific movement");
|
||||
ImGui::SetNextItemWidth(200);
|
||||
ImGui::InputFloat("Distance", &increment);
|
||||
|
||||
ImGui::BeginGroup();
|
||||
components::button("Forward", [] {
|
||||
teleport::teleport_player_to_coords(g_player_service->get_self(), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, increment, 0));
|
||||
});
|
||||
components::button("Backward", [] {
|
||||
teleport::teleport_player_to_coords(g_player_service->get_self(), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, -increment, 0));
|
||||
});
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
components::button("Left", [] {
|
||||
teleport::teleport_player_to_coords(g_player_service->get_self(), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, -increment, 0, 0));
|
||||
});
|
||||
components::button("Right", [] {
|
||||
teleport::teleport_player_to_coords(g_player_service->get_self(), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, increment, 0, 0));
|
||||
});
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
components::button("Up", [] {
|
||||
teleport::teleport_player_to_coords(g_player_service->get_self(), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, 0, increment));
|
||||
});
|
||||
components::button("Down", [] {
|
||||
teleport::teleport_player_to_coords(g_player_service->get_self(), ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0, 0, -increment));
|
||||
});
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("VEHICLES"_T.data());
|
||||
ImGui::Spacing();
|
||||
|
||||
components::command_button<"lastvehtp">();
|
||||
ImGui::SameLine();
|
||||
components::command_button<"bringpv">();
|
||||
ImGui::SameLine();
|
||||
components::command_button<"pvtp">();
|
||||
|
||||
components::title("GUI_TAB_IPL"_T.data());
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("GUI_TAB_IPL"_T.data());
|
||||
|
||||
if (ImGui::BeginCombo("IPL_LOCATION"_T.data(), ipls[g.self.ipls.select].friendly_name))
|
||||
{
|
||||
@ -69,7 +128,9 @@ namespace big
|
||||
selected_ipl.location.z);
|
||||
}
|
||||
|
||||
components::sub_title("IPL_INFOS"_T.data());
|
||||
ImGui::Spacing();
|
||||
components::small_text("IPL_INFOS"_T.data());
|
||||
|
||||
ImGui::Text(std::vformat("IPL_CNT"_T, std::make_format_args(selected_ipl.ipl_names.size())).data());
|
||||
ImGui::Text(std::vformat("IPL_POSITION"_T,
|
||||
std::make_format_args(selected_ipl.location.x, selected_ipl.location.y, selected_ipl.location.z))
|
||||
|
@ -30,50 +30,48 @@ namespace big
|
||||
|
||||
components::command_checkbox<"rapidfire">();
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Checkbox("ENABLE_SPECIAL_AMMO"_T.data(), &g.weapons.ammo_special.toggle);
|
||||
components::options_modal("Special ammo", [] {
|
||||
eAmmoSpecialType selected_ammo = g.weapons.ammo_special.type;
|
||||
eExplosionTag selected_explosion = g.weapons.ammo_special.explosion_tag;
|
||||
|
||||
eAmmoSpecialType selected_ammo = g.weapons.ammo_special.type;
|
||||
eExplosionTag selected_explosion = g.weapons.ammo_special.explosion_tag;
|
||||
|
||||
if (ImGui::BeginCombo("SPECIAL_AMMO"_T.data(), SPECIAL_AMMOS[(int)selected_ammo].name))
|
||||
{
|
||||
for (const auto& special_ammo : SPECIAL_AMMOS)
|
||||
if (ImGui::BeginCombo("SPECIAL_AMMO"_T.data(), SPECIAL_AMMOS[(int)selected_ammo].name))
|
||||
{
|
||||
if (ImGui::Selectable(special_ammo.name, special_ammo.type == selected_ammo))
|
||||
for (const auto& special_ammo : SPECIAL_AMMOS)
|
||||
{
|
||||
g.weapons.ammo_special.type = special_ammo.type;
|
||||
}
|
||||
if (ImGui::Selectable(special_ammo.name, special_ammo.type == selected_ammo))
|
||||
{
|
||||
g.weapons.ammo_special.type = special_ammo.type;
|
||||
}
|
||||
|
||||
if (special_ammo.type == selected_ammo)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
if (special_ammo.type == selected_ammo)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
if (ImGui::BeginCombo("BULLET_IMPACT"_T.data(), BULLET_IMPACTS[selected_explosion]))
|
||||
{
|
||||
for (const auto& [type, name] : BULLET_IMPACTS)
|
||||
if (ImGui::BeginCombo("BULLET_IMPACT"_T.data(), BULLET_IMPACTS[selected_explosion]))
|
||||
{
|
||||
if (ImGui::Selectable(name, type == selected_explosion))
|
||||
for (const auto& [type, name] : BULLET_IMPACTS)
|
||||
{
|
||||
g.weapons.ammo_special.explosion_tag = type;
|
||||
if (ImGui::Selectable(name, type == selected_explosion))
|
||||
{
|
||||
g.weapons.ammo_special.explosion_tag = type;
|
||||
}
|
||||
|
||||
if (type == selected_explosion)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == selected_explosion)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
|
@ -1,49 +0,0 @@
|
||||
#include "services/context_menu/context_menu_service.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::context_menu_settings()
|
||||
{
|
||||
ImGui::Checkbox("SETTINGS_CONTEXT_MENU"_T.data(), &g.context_menu.enabled);
|
||||
|
||||
if (g.context_menu.enabled)
|
||||
{
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_ENTITY_TYPES"_T.data());
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_OBJECT"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::OBJECT));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_PED"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::PED));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_PLAYER"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::PLAYER));
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("SETTINGS_CONTEXT_MENU_ENTITY_TYPE_VEHICLE"_T.data(),
|
||||
reinterpret_cast<int*>(&g.context_menu.allowed_entity_types),
|
||||
static_cast<int>(ContextEntityType::VEHICLE));
|
||||
|
||||
static ImVec4 selected_option_color = ImGui::ColorConvertU32ToFloat4(g.context_menu.selected_option_color);
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###BSelected Option Color##cm_picker", (float*)&selected_option_color, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.context_menu.selected_option_color = ImGui::ColorConvertFloat4ToU32(selected_option_color);
|
||||
}
|
||||
|
||||
ImGui::Checkbox("SETTINGS_CONTEXT_MENU_BOUNDING_BOX"_T.data(), &g.context_menu.bounding_box_enabled);
|
||||
|
||||
if (g.context_menu.bounding_box_enabled)
|
||||
{
|
||||
static ImVec4 bounding_box_color = ImGui::ColorConvertU32ToFloat4(g.context_menu.bounding_box_color);
|
||||
ImGui::Text("SETTINGS_CONTEXT_MENU_BOUNDING_BOX_COLOR"_T.data());
|
||||
if (ImGui::ColorEdit4("###Bounding Box Color##cm_picker", (float*)&bounding_box_color, ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_NoSidePreview))
|
||||
{
|
||||
g.context_menu.bounding_box_color = ImGui::ColorConvertFloat4ToU32(bounding_box_color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -203,6 +203,17 @@ namespace big
|
||||
});
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (components::button("Max Performance"))
|
||||
{
|
||||
g_fiber_pool->queue_job([] {
|
||||
vehicle::max_vehicle_performance(self::veh);
|
||||
|
||||
// refresh mod names
|
||||
player_vehicle = 0;
|
||||
});
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
static char plate[9];
|
||||
|
@ -95,6 +95,23 @@ namespace big
|
||||
|
||||
components::command_checkbox<"mutesiren">();
|
||||
|
||||
components::command_checkbox<"speedometer">();
|
||||
components::options_modal("Speedometer", [] {
|
||||
ImGui::Text("POS_X_Y"_T.data());
|
||||
|
||||
float pos[2] = {g.vehicle.speedo_meter.x, 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];
|
||||
}
|
||||
|
||||
components::command_checkbox<"speedometerleftside">();
|
||||
ImGui::SameLine();
|
||||
components::command_checkbox<"speedometergears">();
|
||||
});
|
||||
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
ImGui::Separator();
|
||||
@ -164,28 +181,6 @@ namespace big
|
||||
ImGui::SameLine();
|
||||
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::MPS].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::MPS);
|
||||
}
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("SPEEDO_METER"_T);
|
||||
{
|
||||
components::command_checkbox<"speedometer">();
|
||||
if (g.vehicle.speedo_meter.enabled)
|
||||
{
|
||||
ImGui::Text("POS_X_Y"_T.data());
|
||||
|
||||
float pos[2] = {g.vehicle.speedo_meter.x, 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];
|
||||
}
|
||||
|
||||
components::command_checkbox<"speedometerleftside">();
|
||||
ImGui::SameLine();
|
||||
components::command_checkbox<"speedometergears">();
|
||||
}
|
||||
}
|
||||
|
||||
g.vehicle.proof_mask = 0;
|
||||
if (g.vehicle.god_mode)
|
||||
|
Reference in New Issue
Block a user