feat(players): Vehicle Tree (#903)
* feat(player_info): Open Social Club Overlay
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "core/scr_globals.hpp"
|
||||
#include "services/player_database/player_database_service.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
#include <script/globals/GPBD_FM.hpp>
|
||||
#include <script/globals/GPBD_FM_3.hpp>
|
||||
@ -14,6 +15,11 @@ namespace big
|
||||
{
|
||||
if (ImGui::TreeNode("INFO"_T.data()))
|
||||
{
|
||||
components::button("Open SC Overlay", [] {
|
||||
int gamerHandle;
|
||||
NETWORK::NETWORK_HANDLE_FROM_PLAYER(g_player_service->get_selected()->id(), &gamerHandle, 13);
|
||||
NETWORK::NETWORK_SHOW_PROFILE_UI(&gamerHandle);
|
||||
});
|
||||
ImGui::Text("PLAYER_INFO_ID"_T.data(), g_player_service->get_selected()->id());
|
||||
|
||||
ImGui::Text("PLAYER_INFO_SESSION_HOST"_T.data(),
|
||||
@ -150,7 +156,7 @@ namespace big
|
||||
ImGui::Text("PLAYER_INFO_BANK"_T.data(), stats.Money - stats.WalletBalance);
|
||||
ImGui::Text("PLAYER_INFO_TOTAL_MONEY"_T.data(), stats.Money);
|
||||
ImGui::Text("PLAYER_INFO_RANK"_T.data(), stats.Rank, stats.RP);
|
||||
ImGui::Text("Health: %d (MaxHealth: %d)", ped_health, ped_maxhealth);// TODO: translate
|
||||
ImGui::Text("Health: %d (MaxHealth: %d)", ped_health, ped_maxhealth); // TODO: translate
|
||||
ImGui::Text("PLAYER_INFO_KD"_T.data(), stats.KdRatio);
|
||||
ImGui::Text("PLAYER_INFO_KILLS"_T.data(), stats.KillsOnPlayers);
|
||||
ImGui::Text("PLAYER_INFO_DEATHS"_T.data(), stats.DeathsByPlayers);
|
||||
@ -158,7 +164,7 @@ namespace big
|
||||
ImGui::Text("PLAYER_INFO_LAP_DANCES"_T.data(), stats.LapDancesBought);
|
||||
ImGui::Text("PLAYER_INFO_MISSIONS_CREATED"_T.data(), stats.MissionsCreated);
|
||||
ImGui::Text("PLAYER_INFO_METLDOWN_COMPLETE"_T.data(),
|
||||
scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "YES"_T.data() : "NO"_T.data());// curious to see if anyone has actually played singleplayer
|
||||
scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "YES"_T.data() : "NO"_T.data()); // curious to see if anyone has actually played singleplayer
|
||||
|
||||
|
||||
ImGui::Separator();
|
||||
|
44
src/views/players/player/player_vehicle.cpp
Normal file
44
src/views/players/player/player_vehicle.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::player_vehicle()
|
||||
{
|
||||
if (ImGui::TreeNode("Vehicle"))
|
||||
{
|
||||
components::player_command_button<"vehkick">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"flyingveh">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"boostveh">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"stopveh">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"flip180">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"rcplayer">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"killengine">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"burstwheels">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"smashwindows">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"blacktint">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"lockveh">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"unlockveh">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"opendoors">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"closedoors">(g_player_service->get_selected(), {});
|
||||
|
||||
components::player_command_button<"upgradeveh">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"downgradeveh">(g_player_service->get_selected(), {});
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
@ -14,6 +14,7 @@ namespace big
|
||||
view::player_kick();
|
||||
view::player_toxic();
|
||||
view::player_misc();
|
||||
view::player_vehicle();
|
||||
}
|
||||
}
|
||||
}
|
@ -63,5 +63,6 @@ namespace big
|
||||
static void player_kick();
|
||||
static void player_toxic();
|
||||
static void player_misc();
|
||||
static void player_vehicle();
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user