feat(Vehicle): Instant into vehicle (globals) (#181)
This commit is contained in:
parent
1088ec6d4b
commit
135d3b80ff
@ -6,9 +6,15 @@
|
|||||||
#include "pointers.hpp"
|
#include "pointers.hpp"
|
||||||
#include "script.hpp"
|
#include "script.hpp"
|
||||||
#include "teleport.hpp"
|
#include "teleport.hpp"
|
||||||
|
#include "script_global.hpp"
|
||||||
|
|
||||||
namespace big::vehicle
|
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)
|
inline void bring(Vehicle veh, Vector3 location, bool put_in = true)
|
||||||
{
|
{
|
||||||
Vector3 vecVehicleLocation = ENTITY::GET_ENTITY_COORDS(veh, true);
|
Vector3 vecVehicleLocation = ENTITY::GET_ENTITY_COORDS(veh, true);
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "util/vehicle.hpp"
|
#include "util/vehicle.hpp"
|
||||||
#include "views/view.hpp"
|
#include "views/view.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
void view::vehicle() {
|
void view::vehicle() {
|
||||||
@ -22,7 +23,14 @@ namespace big
|
|||||||
components::button("Repair", [] {
|
components::button("Repair", [] {
|
||||||
|
|
||||||
vehicle::repair(self::veh);
|
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"))
|
if (ImGui::TreeNode("Paint"))
|
||||||
{
|
{
|
||||||
@ -117,4 +125,4 @@ namespace big
|
|||||||
|
|
||||||
ImGui::Checkbox("Left Sided", &g->vehicle.speedo_meter.left_side);
|
ImGui::Checkbox("Left Sided", &g->vehicle.speedo_meter.left_side);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user