feat(Vehicle): Instant into vehicle (globals) (#181)

This commit is contained in:
MoneyDropLobby 2022-05-09 22:58:53 +02:00 committed by GitHub
parent 1088ec6d4b
commit 135d3b80ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -6,9 +6,15 @@
#include "pointers.hpp"
#include "script.hpp"
#include "teleport.hpp"
#include "script_global.hpp"
namespace big::vehicle
{
inline void go_into_personal_vehicle()
{
*script_global(2671447).at(8).as<int*>() = 1;
}
inline void bring(Vehicle veh, Vector3 location, bool put_in = true)
{
Vector3 vecVehicleLocation = ENTITY::GET_ENTITY_COORDS(veh, true);

View File

@ -5,6 +5,7 @@
#include "util/vehicle.hpp"
#include "views/view.hpp"
namespace big
{
void view::vehicle() {
@ -22,7 +23,14 @@ namespace big
components::button("Repair", [] {
vehicle::repair(self::veh);
});
});
components::button("Instant in personal vehicle", [] {
if (!*g_pointers->m_is_session_started) return g_notification_service->push_warning("WARNING", "Go into GTA V Online to use this option");
vehicle::go_into_personal_vehicle();
});
if (ImGui::TreeNode("Paint"))
{
@ -117,4 +125,4 @@ namespace big
ImGui::Checkbox("Left Sided", &g->vehicle.speedo_meter.left_side);
}
}
}