mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 07:07:32 +08:00
feat(PlayerWindow): Added teleport options
This commit is contained in:
parent
1b0fd4960d
commit
b769503115
@ -8,5 +8,6 @@ namespace big
|
||||
{
|
||||
public:
|
||||
static void tab_info();
|
||||
static void tab_teleport();
|
||||
};
|
||||
}
|
41
BigBaseV2/src/gui/window/player/player_teleport.cpp
Normal file
41
BigBaseV2/src/gui/window/player/player_teleport.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
#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()
|
||||
{
|
||||
teleport::to_player(g.selected_player.id);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Bring"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
teleport::bring_player(g.selected_player.id);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
if (ImGui::Button("Teleport into Vehicle"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g.selected_player.id), false);
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
}
|
@ -18,6 +18,7 @@ namespace big
|
||||
{
|
||||
ImGui::BeginTabBar("tabbar_player");
|
||||
tab_player::tab_info();
|
||||
tab_player::tab_teleport();
|
||||
ImGui::EndTabBar();
|
||||
|
||||
ImGui::End();
|
||||
|
Loading…
x
Reference in New Issue
Block a user