diff --git a/BigBaseV2/src/views/esp/view_esp.cpp b/BigBaseV2/src/views/esp/view_esp.cpp index 8013388d..50526cbb 100644 --- a/BigBaseV2/src/views/esp/view_esp.cpp +++ b/BigBaseV2/src/views/esp/view_esp.cpp @@ -39,7 +39,7 @@ namespace big if (multplr == -1.f || g->esp.global_render_distance[0] > distance) continue; - bool god = misc::has_bit_set((int*)&plyr->get_ped()->m_damage_bits, 8); + uint32_t ped_damage_bits = plyr->get_ped()->m_damage_bits; if (g_pointers->m_get_screen_coords_for_world_coords(player_pos.data, &screen_x, &screen_y)) { @@ -86,10 +86,34 @@ namespace big draw_list->AddText(name_pos, esp_color, name_str.c_str()); - if (god && g->esp.god) { - draw_list->AddText({ esp_x - (62.5f * multplr), esp_y - (175.f * multplr) - 40.f }, ImColor(1.f, 0.f, 0.f, 1.f), "GOD"); + if (ped_damage_bits && g->esp.god) { + std::string mode_str = ""; + + if (ped_damage_bits & (uint32_t)eEntityProofs::GOD) + { + mode_str = "GOD"; + } + else + { + if (ped_damage_bits & (uint32_t)eEntityProofs::BULLET) + { + mode_str += "BULLET "; + } + if (ped_damage_bits & (uint32_t)eEntityProofs::EXPLOSION) + { + mode_str += "EXPLOSION "; + } + } + + if (!mode_str.empty()) + { + draw_list->AddText({ esp_x - (62.5f * multplr), esp_y - (175.f * multplr) - 40.f }, ImColor(1.f, 0.f, 0.f, 1.f), mode_str.c_str()); + } } - else { + else + { + + if (g->esp.health) { if (g->esp.scale_health_from_dist) { draw_list->AddLine({ esp_x - (62.5f * multplr), esp_y + (175.f * multplr) + 5.f }, { esp_x - (62.5f * multplr) + (125.f * multplr), esp_y + (175.f * multplr) + 5.f }, health_perc == 0.f ? death_bg : health_perc < 0.25f ? health_red_bg : health_perc < 0.65f ? health_yellow_bg : health_green_bg, 4); diff --git a/BigBaseV2/src/views/players/view_player.cpp b/BigBaseV2/src/views/players/view_player.cpp index 1aa05569..2afe6482 100644 --- a/BigBaseV2/src/views/players/view_player.cpp +++ b/BigBaseV2/src/views/players/view_player.cpp @@ -18,8 +18,6 @@ namespace big if (g_player_service->get_selected()->is_valid()) { - //components::button("Desync", [] { gta_util::get_network_player_mgr()->RemovePlayer(g_player_service->get_selected()->get_net_game_player()); }); - if (ImGui::TreeNode("Misc")) { components::button("Steal Outfit", [] { ped::steal_outfit( @@ -79,18 +77,76 @@ namespace big ImGui::Text("Wanted Level: %d", player_info->m_wanted_level); } + uint32_t ped_damage_bits = 0; + uint32_t ped_task_flag = 0; + uint32_t veh_damage_bits = 0; + std::string mode_str = ""; + if (CPed* ped = g_player_service->get_selected()->get_ped(); ped != nullptr) { - ImGui::Text("Player God Mode: %s", - misc::has_bit_set((int*)&ped->m_damage_bits, 8) ? "Yes" : "No" - ); + ped_damage_bits = ped->m_damage_bits; + ped_task_flag = ped->m_ped_task_flag; } - CAutomobile* vehicle = g_player_service->get_selected()->get_current_vehicle(); - ImGui::Text("Vehicle God Mode: %s", - vehicle == nullptr ? "No vehicle detected" : - misc::has_bit_set((int*)&vehicle->m_damage_bits, 8) ? "Yes" : "No" - ); + if (ped_damage_bits & (uint32_t)eEntityProofs::GOD) + { + mode_str = "God"; + } + else + { + if (ped_damage_bits & (uint32_t)eEntityProofs::BULLET) + { + mode_str += "Bullet, "; + } + if (ped_damage_bits & (uint32_t)eEntityProofs::EXPLOSION) + { + mode_str += "Explosion, "; + } + } + + if (mode_str.empty()) + { + mode_str = "No"; + } + + ImGui::Text("Player God Mode: %s", mode_str.c_str()); + + mode_str = ""; + + if (CAutomobile* vehicle = g_player_service->get_selected()->get_current_vehicle(); vehicle != nullptr) + { + veh_damage_bits = vehicle->m_damage_bits; + } + + if (ped_task_flag & (uint8_t)ePedTask::TASK_DRIVING) + { + if (veh_damage_bits & (uint32_t)eEntityProofs::GOD) + { + mode_str = "God"; + } + else + { + if (veh_damage_bits & (uint32_t)eEntityProofs::COLLISION) + { + mode_str += "Collision, "; + } + if (veh_damage_bits & (uint32_t)eEntityProofs::EXPLOSION) + { + mode_str += "Explosion, "; + } + } + + if (mode_str.empty()) + { + mode_str = "No"; + } + } + else + { + mode_str = "No vehicle detected"; + } + + ImGui::Text("Vehicle God Mode: %s", mode_str.c_str()); ImGui::Separator(); diff --git a/BigBaseV2/src/views/players/view_players.cpp b/BigBaseV2/src/views/players/view_players.cpp index 3d7bd788..b2455d51 100644 --- a/BigBaseV2/src/views/players/view_players.cpp +++ b/BigBaseV2/src/views/players/view_players.cpp @@ -24,7 +24,8 @@ namespace big if (plyr->is_valid()) { isHost = plyr->is_host(); isFriend = plyr->is_friend(); - isInVehicle = plyr->get_current_vehicle() != nullptr; + isInVehicle = (plyr->get_ped() != nullptr) && + (plyr->get_ped()->m_ped_task_flag & (uint8_t)ePedTask::TASK_DRIVING); } // generate icons string @@ -49,7 +50,7 @@ namespace big ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, { 0.0, 0.5 }); ImGui::PushID(plyr->id()); - if (ImGui::Button(plyr->get_name(), { 300.0f - 15.0f - ImGui::GetStyle().ScrollbarSize, 0.f })) + if (ImGui::Button(plyr->get_name(), {300.0f - 15.0f - ImGui::GetStyle().ScrollbarSize, 0.f})) { g_player_service->set_selected(plyr); g_gui_service->set_selected(tabs::PLAYER);