2021-07-25 21:02:57 +02:00
|
|
|
#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()
|
|
|
|
{
|
2022-02-02 01:38:35 +01:00
|
|
|
teleport::to_player(g_player_service->get_selected()->id());
|
2021-07-25 21:02:57 +02:00
|
|
|
}QUEUE_JOB_END_CLAUSE
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
if (ImGui::Button("Bring"))
|
|
|
|
{
|
|
|
|
QUEUE_JOB_BEGIN_CLAUSE()
|
|
|
|
{
|
2022-02-02 01:38:35 +01:00
|
|
|
teleport::bring_player(g_player_service->get_selected()->id());
|
2021-07-25 21:02:57 +02:00
|
|
|
}QUEUE_JOB_END_CLAUSE
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ImGui::Button("Teleport into Vehicle"))
|
|
|
|
{
|
|
|
|
QUEUE_JOB_BEGIN_CLAUSE()
|
|
|
|
{
|
2022-02-02 01:38:35 +01:00
|
|
|
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_player_service->get_selected()->id()), false);
|
2021-07-25 21:02:57 +02:00
|
|
|
|
|
|
|
teleport::into_vehicle(veh);
|
|
|
|
}QUEUE_JOB_END_CLAUSE
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::EndTabItem();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|