Add buttons for vehicle & weapon skill stats

This commit is contained in:
Grinch_ 2022-03-06 13:33:38 +06:00
parent 5b7bbd2330
commit 420581056f
2 changed files with 26 additions and 2 deletions

View File

@ -66,6 +66,10 @@
"Hurricane": "Hurricane",
"KeepStuff": "Keep stuff",
"KeepStuffText": "Keep stuff after arrest/death",
"MaxVehSkills": "Max vehicle skills",
"MaxVehSkillsText": "Maxed out all vehicle skills",
"MaxWepSkills": "Max weapon skills",
"MaxWepSkillsText": "Maxed out all weapon skills",
"Minute": "Minute",
"MissionLoaderTip": "Mission loader may cause,\n\n1. Game crashes\n2. Break save games\n3. Break game progression\n4. Random bugs & glitches\n\nIt's recommanded not to save after using the mission loader. Use it at your own risk!",
"Missions": "Missions",
@ -98,9 +102,9 @@
"WeatherIDText": "Sets weather by IDs (0-255). Don't touch unless you know what you're doing!"
},
"Main": {
"Translator" : "Translator",
"TranslationLanguage": "English",
"TranslationLanguageDisclaimer": "Translated to English by Grinch_",
"Translator": "Translator",
"TranslatorName": "Grinch_"
},
"Menu": {

View File

@ -766,6 +766,27 @@ void Game::ShowPage()
// similar to Ui::DrawJSON()
ImGui::Spacing();
if (ImGui::Button(TEXT("Game.MaxWepSkills"), Ui::GetSize(2)))
{
for (size_t i = 69; i != 80; ++i)
{
CStats::SetStatValue(i, 1000);
}
CHud::GetRidOfAllHudMessages(true);
SetHelpMessage(TEXT("Game.MaxWepSkillsText"));
}
ImGui::SameLine();
if (ImGui::Button(TEXT("Game.MaxVehSkills"), Ui::GetSize(2)))
{
CStats::SetStatValue(160, 1000);
CStats::SetStatValue(223, 1000);
CStats::SetStatValue(229, 1000);
CStats::SetStatValue(230, 1000);
CHud::GetRidOfAllHudMessages(true);
SetHelpMessage(TEXT("Game.MaxVehSkillsText"));
}
ImGui::Spacing();
ImGui::PushItemWidth(ImGui::GetContentRegionAvailWidth() / 2 - 5);
Ui::ListBoxStr("##Categories", m_StatData.m_Categories, m_StatData.m_Selected);
ImGui::SameLine();
@ -773,7 +794,6 @@ void Game::ShowPage()
ImGui::PopItemWidth();
ImGui::Spacing();
ImGui::BeginChild("STATCHILD");
for (auto root : m_StatData.m_pJson->m_Data.items())
{