feat(GUI): Added vehicle tab

This commit is contained in:
Yimura 2020-12-26 17:22:51 +01:00
parent 70743a1d1b
commit 83175ecebc
3 changed files with 58 additions and 0 deletions

View File

@ -13,6 +13,7 @@ namespace big
tabbar::render_self();
tabbar::render_tunables();
tabbar::render_teleport();
tabbar::render_vehicle();
ImGui::EndTabBar();
}
ImGui::End();

View File

@ -15,6 +15,7 @@ namespace big
static void render_self();
static void render_tunables();
static void render_teleport();
static void render_vehicle();
};
}

View File

@ -0,0 +1,56 @@
#pragma once
#include "tab_bar.hpp"
namespace big
{
void tabbar::render_vehicle()
{
if (ImGui::BeginTabItem("Vehicle"))
{
if (ImGui::Button("Repair Vehicle"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), false);
if (veh)
{
VEHICLE::SET_VEHICLE_FIXED(veh);
features::notify::above_map("Vehicle has been repaired.");
}
}QUEUE_JOB_END_CLAUSE
}
if (ImGui::Button("Clean Vehicle"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), false);
if (veh)
{
VEHICLE::SET_VEHICLE_DIRT_LEVEL(veh, 0.0);
features::notify::above_map("Vehicle has been cleaned.");
}
}QUEUE_JOB_END_CLAUSE
}
if (ImGui::Button("Bullet Proof Tyres"))
{
QUEUE_JOB_BEGIN_CLAUSE()
{
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId), false);
if (veh)
{
VEHICLE::SET_VEHICLE_TYRES_CAN_BURST(veh, false);
}
}QUEUE_JOB_END_CLAUSE
}
ImGui::EndTabItem();
}
}
}