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

53 lines
1.0 KiB
C++
Raw Normal View History

2022-02-28 23:04:56 +01:00
#include "views/view.hpp"
#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"
namespace big
{
2022-06-27 15:45:26 +02:00
void view::teleport()
{
2022-02-28 23:04:56 +01:00
ImGui::Text("Blips:");
2022-06-27 15:45:26 +02:00
components::button("Waypoint", []
{
2022-02-28 23:04:56 +01:00
teleport::to_waypoint();
2022-06-27 15:45:26 +02:00
});
2022-02-28 23:04:56 +01:00
2022-06-27 15:45:26 +02:00
components::button("Objective", []
{
teleport::to_objective();
2022-06-27 15:45:26 +02:00
});
2022-02-28 23:04:56 +01:00
2022-12-06 16:12:02 +00:00
ImGui::Checkbox("Auto-Teleport To Waypoint", &g->self.auto_tp);
2022-02-28 23:04:56 +01:00
ImGui::Text("Vehicles:");
2022-06-27 15:45:26 +02:00
components::button("Teleport to Last Vehicle", []
{
if (g_local_player && g_local_player->m_vehicle)
{
const Vehicle veh = g_pointers->m_ptr_to_handle(g_local_player->m_vehicle);
teleport::into_vehicle(veh);
}
});
components::button("Bring Personal Vehicle", []
{
2022-07-27 14:39:22 +02:00
Vehicle veh = mobile::mechanic::get_personal_vehicle();
2022-02-28 23:04:56 +01:00
vehicle::bring(veh, self::pos);
2022-06-27 15:45:26 +02:00
});
2022-02-28 23:04:56 +01:00
2022-06-27 15:45:26 +02:00
components::button("Teleport to Personal Vehicle", []
{
2022-07-27 14:39:22 +02:00
Vehicle veh = mobile::mechanic::get_personal_vehicle();
2022-02-28 23:04:56 +01:00
2022-06-27 15:45:26 +02:00
teleport::into_vehicle(veh);
});
2022-02-28 23:04:56 +01:00
}
2022-06-27 15:45:26 +02:00
}