mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-07-01 12:02:55 +08:00
feat: Vehicle control & Summon (#1175)
This commit is contained in:
@ -8,6 +8,8 @@
|
||||
#include "util/misc.hpp"
|
||||
#include "util/system.hpp"
|
||||
#include "view_debug.hpp"
|
||||
#include "util/ped.hpp"
|
||||
#include "util/pathfind.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -65,6 +67,16 @@ namespace big
|
||||
NETWORK::SHUTDOWN_AND_LOAD_MOST_RECENT_SAVE();
|
||||
});
|
||||
|
||||
components::button("Tp To Safe Pos", [] {
|
||||
Vector3 safepos{};
|
||||
float heading;
|
||||
if (pathfind::find_closest_vehicle_node(self::pos, safepos, heading, 0))
|
||||
ENTITY::SET_ENTITY_COORDS(self::ped, safepos.x, safepos.y, safepos.z, 0, 0, 0, false);
|
||||
else
|
||||
g_notification_service->push_error("Find safe pos", "Failed to find a safe position");
|
||||
|
||||
});
|
||||
|
||||
components::command_button<"fastquit">();
|
||||
|
||||
if (ImGui::TreeNode("Addresses"))
|
||||
@ -108,6 +120,21 @@ namespace big
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Animation player"))
|
||||
{
|
||||
static char dict[100], anim[100];
|
||||
|
||||
ImGui::PushItemWidth(200);
|
||||
components::input_text_with_hint("##dictionary", "Dict", dict, IM_ARRAYSIZE(dict));
|
||||
components::input_text_with_hint("##animation", "Animation", anim, IM_ARRAYSIZE(anim));
|
||||
if (ImGui::Button("Play animation"))
|
||||
g_fiber_pool->queue_job([=] {
|
||||
ped::ped_play_animation(self::ped, dict, anim);
|
||||
});
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user