From f1c00929566051f99e2f8256b974c784af9c9fb2 Mon Sep 17 00:00:00 2001 From: TheGreenBandit <106003542+TheGreenBandit@users.noreply.github.com> Date: Thu, 26 Jan 2023 13:41:47 -0500 Subject: [PATCH] feat(info): Added Another Godmode Check And Health Info (#839) --- src/services/players/player.cpp | 1 - src/views/players/player/player_info.cpp | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/services/players/player.cpp b/src/services/players/player.cpp index 680b0e6f..8ace661d 100644 --- a/src/services/players/player.cpp +++ b/src/services/players/player.cpp @@ -94,7 +94,6 @@ namespace big return m_is_friend; } - bool player::is_valid() const { return m_net_game_player == nullptr ? false : m_net_game_player->is_valid(); diff --git a/src/views/players/player/player_info.cpp b/src/views/players/player/player_info.cpp index f1456019..013b39bd 100644 --- a/src/views/players/player/player_info.cpp +++ b/src/views/players/player/player_info.cpp @@ -27,6 +27,8 @@ namespace big uint32_t ped_damage_bits = 0; uint32_t ped_task_flag = 0; + uint32_t ped_health = 0; + uint32_t ped_maxhealth = 0; uint32_t veh_damage_bits = 0; std::string mode_str = ""; @@ -34,6 +36,8 @@ namespace big { ped_damage_bits = ped->m_damage_bits; ped_task_flag = ped->m_ped_task_flag; + ped_health = ped->m_health; + ped_maxhealth = ped->m_maxhealth; } if (ped_damage_bits & (uint32_t)eEntityProofs::GOD) @@ -50,6 +54,10 @@ namespace big { mode_str += "Explosion, "; } + if (ped_health > 328 || ped_maxhealth > 328 && !(uint32_t)eEntityProofs::EXPLOSION && !(uint32_t)eEntityProofs::BULLET) + { + mode_str += "Unnatural Health"; + } } if (mode_str.empty()) @@ -142,6 +150,7 @@ namespace big ImGui::Text("Money In Bank: %d", stats.Money - stats.WalletBalance); ImGui::Text("Total Money: %d", stats.Money); ImGui::Text("Rank: %d (RP %d)", stats.Rank, stats.RP); + ImGui::Text("Health: %d (MaxHealth: %d)", ped_health, ped_maxhealth); ImGui::Text("K/D Ratio: %f", stats.KdRatio); ImGui::Text("Kills On Players: %d", stats.KillsOnPlayers); ImGui::Text("Deaths By Players: %d", stats.DeathsByPlayers); @@ -181,4 +190,4 @@ namespace big ImGui::TreePop(); } } -} \ No newline at end of file +}