2023-04-07 23:08:34 +02:00
|
|
|
#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();
|
|
|
|
|
|
|
|
components::sub_title("GTA cache stats:");
|
|
|
|
ImGui::Text("Peds Cached: %d\nVehicles Cached: %d\nWeapons Cached: %d", ped_count, veh_count, wep_count);
|
|
|
|
|
2023-07-10 00:40:47 +02:00
|
|
|
if (components::button("Rebuild Cache"))
|
2023-04-07 23:08:34 +02:00
|
|
|
{
|
|
|
|
g_gta_data_service->set_state(eGtaDataUpdateState::NEEDS_UPDATE);
|
2023-07-10 00:40:47 +02:00
|
|
|
g_gta_data_service->update_now();
|
2023-04-07 23:08:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|