mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 14:57:27 +08:00
27 lines
820 B
C++
27 lines
820 B
C++
#include "natives.hpp"
|
|
#include "pointers.hpp"
|
|
#include "script.hpp"
|
|
#include "services/gta_data/gta_data_service.hpp"
|
|
#include "thread_pool.hpp"
|
|
#include "views/view.hpp"
|
|
|
|
namespace big
|
|
{
|
|
void view::gta_cache()
|
|
{
|
|
auto ped_count = g_gta_data_service->peds().size();
|
|
auto veh_count = g_gta_data_service->vehicles().size();
|
|
auto wep_count = g_gta_data_service->weapons().size();
|
|
auto wep_comp_count = g_gta_data_service->weapon_components().size();
|
|
|
|
components::sub_title("GTA cache stats:");
|
|
ImGui::Text("Peds Cached: %d\nVehicles Cached: %d\nWeapons Cached: %d\nWeapon Components Cached: %d", ped_count, veh_count, wep_count, wep_comp_count);
|
|
|
|
if (components::button("Rebuild Cache"))
|
|
{
|
|
g_gta_data_service->set_state(eGtaDataUpdateState::NEEDS_UPDATE);
|
|
g_gta_data_service->update_now();
|
|
}
|
|
}
|
|
}
|