mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-07 09:53:50 +08:00
feat(Teleport): Added more teleport to objective (#185)
Co-authored-by: Yimura <andreas.maerten@scarlet.be>
This commit is contained in:
parent
929705cd8a
commit
cce5c553e6
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "blip.hpp"
|
||||
#include "entity.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
|
||||
namespace big::teleport
|
||||
{
|
||||
@ -139,4 +140,23 @@ namespace big::teleport
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool to_objective()
|
||||
{
|
||||
if (to_blip((int)BlipIcons::Circle, (int)BlipColors::YellowMission)) return true;
|
||||
if (to_blip((int)BlipIcons::Circle, (int)BlipColors::YellowMission2)) return true;
|
||||
if (to_blip((int)BlipIcons::Circle, (int)BlipColors::Mission)) return true;
|
||||
if (to_blip((int)BlipIcons::RaceFinish, (int)BlipColors::None)) return true;
|
||||
if (to_blip((int)BlipIcons::Circle, (int)BlipColors::Green)) return true;
|
||||
if (to_blip((int)BlipIcons::Circle, (int)BlipColors::Blue)) return true;
|
||||
if (to_blip((int)BlipIcons::CrateDrop)) return true;
|
||||
static const int blips[] = { 1, 57, 128, 129, 130, 143, 144, 145, 146, 271, 286, 287, 288 };
|
||||
for (int i = 0; i < (sizeof(blips) / sizeof(*blips)); i++) {
|
||||
if (to_blip(blips[i], 5)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
g_notification_service->push_warning("Teleport", "Failed to find objective position");
|
||||
return false;
|
||||
}
|
||||
}
|
@ -15,13 +15,7 @@ namespace big
|
||||
});
|
||||
|
||||
components::button("Objective", [] {
|
||||
static const int blips[] = { 1, 57, 128, 129, 130, 143, 144, 145, 146, 271, 286, 287, 288 };
|
||||
for (int i = 0; i < (sizeof(blips) / sizeof(*blips)); i++) {
|
||||
if (teleport::to_blip(blips[i], 5)) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
teleport::to_objective();
|
||||
});
|
||||
|
||||
ImGui::Text("Vehicles:");
|
||||
|
Loading…
x
Reference in New Issue
Block a user