2023-04-29 13:29:28 +02:00
|
|
|
#include "core/data/ipls.hpp"
|
2022-02-28 23:04:56 +01:00
|
|
|
#include "fiber_pool.hpp"
|
|
|
|
#include "util/globals.hpp"
|
2022-07-27 14:39:22 +02:00
|
|
|
#include "util/mobile.hpp"
|
2022-02-28 23:04:56 +01:00
|
|
|
#include "util/teleport.hpp"
|
|
|
|
#include "util/vehicle.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "views/view.hpp"
|
2022-02-28 23:04:56 +01:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2022-06-27 15:45:26 +02:00
|
|
|
void view::teleport()
|
|
|
|
{
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Text("BLIPS"_T.data());
|
2022-02-28 23:04:56 +01:00
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_button<"waypointtp">({}, "Waypoint");
|
|
|
|
ImGui::SameLine();
|
|
|
|
components::command_button<"objectivetp">({}, "Objective");
|
2023-01-31 00:19:05 +01:00
|
|
|
components::command_checkbox<"autotptowp">();
|
2022-12-06 16:12:02 +00:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Text("VEHICLES"_T.data());
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_button<"lastvehtp">();
|
|
|
|
ImGui::SameLine();
|
|
|
|
components::command_button<"bringpv">();
|
|
|
|
ImGui::SameLine();
|
|
|
|
components::command_button<"pvtp">();
|
2023-04-29 13:29:28 +02:00
|
|
|
|
|
|
|
components::title("GUI_TAB_IPL"_T.data());
|
|
|
|
|
|
|
|
if (ImGui::BeginCombo("IPL_LOCATION"_T.data(), ipls[g.self.ipls.select].friendly_name))
|
|
|
|
{
|
|
|
|
for (int i = 0; i < IM_ARRAYSIZE(ipls); i++)
|
|
|
|
{
|
|
|
|
if (ImGui::Selectable(ipls[i].friendly_name, i == g.self.ipls.select))
|
|
|
|
g.self.ipls.select = i;
|
|
|
|
|
|
|
|
if (i == g.self.ipls.select)
|
|
|
|
ImGui::SetItemDefaultFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::EndCombo();
|
|
|
|
}
|
|
|
|
|
|
|
|
auto selected_ipl = ipls[g.self.ipls.select];
|
|
|
|
if (components::button("LOAD_IPL"_T.data()))
|
|
|
|
{
|
|
|
|
//unload all previous ipls
|
|
|
|
for (auto& ipl : ipls)
|
|
|
|
for (auto& ipl_name : ipl.ipl_names)
|
|
|
|
{
|
|
|
|
if (STREAMING::IS_IPL_ACTIVE(ipl_name))
|
|
|
|
{
|
|
|
|
LOG(INFO) << "unloading existing ipl " << ipl_name;
|
|
|
|
STREAMING::REMOVE_IPL(ipl_name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//load the new ipl
|
|
|
|
for (auto& ipl_name : selected_ipl.ipl_names)
|
|
|
|
STREAMING::REQUEST_IPL(ipl_name);
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
|
|
|
if (components::button("TP_TO_IPL"_T.data()))
|
|
|
|
{
|
|
|
|
PED::SET_PED_COORDS_KEEP_VEHICLE(self::ped,
|
|
|
|
selected_ipl.location.x,
|
|
|
|
selected_ipl.location.y,
|
|
|
|
selected_ipl.location.z);
|
|
|
|
}
|
|
|
|
|
|
|
|
components::sub_title("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))
|
|
|
|
.data());
|
2022-02-28 23:04:56 +01:00
|
|
|
}
|
2022-06-27 15:45:26 +02:00
|
|
|
}
|