Add translation support for Game page

This commit is contained in:
Grinch_ 2022-02-28 01:02:11 +06:00
parent 8025f1e51a
commit afaaccef23
4 changed files with 170 additions and 109 deletions

View File

@ -39,8 +39,8 @@
"Country": "Country", "Country": "Country",
"CurrentDay": "Current day", "CurrentDay": "Current day",
"DaysPassed": "Days passed", "DaysPassed": "Days passed",
"DisableCheats": "Disable cheats",
"DisableReplay": "Disable F1 & F3 replay", "DisableReplay": "Disable F1 & F3 replay",
"DsiableCheats": "Disable cheats",
"Enable": "Enable", "Enable": "Enable",
"EnableText": "Forward: I\tBackward: K\n\nLeft: J\t\t Right: L\n\nSlower: RCtrl\tFaster: RShift\n\nZoom: Mouse wheel", "EnableText": "Forward: I\tBackward: K\n\nLeft: J\t\t Right: L\n\nSlower: RCtrl\tFaster: RShift\n\nZoom: Mouse wheel",
"ExtraColors": "Extra colors", "ExtraColors": "Extra colors",
@ -160,6 +160,75 @@
"VehStopKey": "Vehicle instant start", "VehStopKey": "Vehicle instant start",
"Version": "Version" "Version": "Version"
}, },
"Player": {
"AimSkinChanger": "Aim skin changer",
"AimSkinChangerTip": "Changes to the ped, player is targeting with a weapon.\nTo use aim a ped with a weapon and press ",
"AppearanceTab": "Appearance",
"Armour": "Armour",
"Body": "Body",
"BountyYourself": "Bounty on yourself",
"BulletProof": "Bullet proof",
"CameraZoom": "Camera zoom",
"ChangeToCJ": "Change to CJ skin",
"ClothesTab": "Clothes",
"ClothesTip": "If CJ is wearing a full suit, click 'Extras' or 'Remove all' to remove it.",
"CollisionProof": "Collision proof",
"CoordCopied": "Coordinates copied",
"CopyCoordinates": "Copy coordinates",
"CustomSkinsDirTip": "Place your dff & txd files inside 'modloader/CustomSkins'",
"CustomSkinsTab": "Custom skins",
"CustomSkinsTip": "Note: Your txd & dff names can't exceed 8 characters. Don't change names while the game is running.",
"CustomSkinTutorial": "Custom skin allows to change player skins without replacing any existing game ped skins.\n\nSteps to enable 'Custom Skins',\n\n\n1. Download & install modloader\n\n2. Create a folder inside 'modloader' folder with the name 'CustomSkins'\n\n3. Download ped skins online ( .dff & .txd files) and put them inside.\n\n4. Restart your game.\n\n\n\nLimitations:\n\n1. Your .dff & .txd file names must not exceed 8 characters.\n\n2. Do not rename them while the game is running\n\n\nDoing so will crash your game.",
"CycleJump": "Higher cycle jumps",
"DownloadModloader": "Download modloader",
"DrunkEffect": "Drunk effect",
"Energy": "Energy",
"ExplosionProof": "Explosion proof",
"FastSprint": "Fast sprint",
"FastSprintTip": "Best to enable God Mode & Infinite sprint too",
"Fat": "Fat",
"FireProof": "Fire proof",
"FreeHealthcare": "Free healthcare",
"GodDisabled": "God mode disabled",
"GodEnabled": "God mode enabled",
"GodMode": "God mode",
"Health": "Health",
"HealthRegen": "Health regeneration",
"HealthRegenTip": "Player heals if not taken damage for 5 seconds",
"InfO2": "Infinite oxygen",
"InfSprint": "Infinite sprint",
"InvisPlayer": "Invisible player",
"LockControl": "Lock control",
"LungCapacity": "Lung capacity",
"MaxAppeal": "Max sex appeal",
"MaxHealth": "Max health",
"MeeleProof": "Meele proof",
"MegaJump": "Mega jump",
"MegaPunch": "Mega punch",
"Money": "Money",
"Muscle": "Muscle",
"NeedCJSkin": "You need to be in CJ skin",
"NeverGetHungry": "Never get hungry",
"NeverWanted": "Never wanted",
"NoFee": "No arrest fee",
"PedSkinsTab": "Ped skins",
"PlayerFlags": "Player flags,",
"RemoveAll": "Remove all",
"RemoveClothesTab": "Remove clothes",
"RespawnDieLoc": "Respawn die location",
"RespawnDieLocTip": "Respawn to the location you died from",
"Respect": "Respect",
"SkinChangeFrozen": "Player must be frozen to change skins",
"Skinny": "Skinny",
"SkinsTab": "Skins",
"SpecialNotImplement": "Spawning special peds isn't implemented yet",
"Stamina": "Stamina",
"Suicide": "Suicide",
"TopDownCamera": "Top down camera",
"TotalSkins": "Total skins: ",
"WantedLevel": "Wanted level",
"WorkSkinOnly": "Only contains the skins that works"
},
"Teleport": { "Teleport": {
"AddLocation": "Add location", "AddLocation": "Add location",
"Coordinates": "Coordinates", "Coordinates": "Coordinates",
@ -316,13 +385,18 @@
"AddNew": "Add new", "AddNew": "Add new",
"AnimationPage": "Animation", "AnimationPage": "Animation",
"CheckboxTab": "Checkboxes", "CheckboxTab": "Checkboxes",
"Default": "Def",
"Enabled": "Enabled",
"GamePage": "Game", "GamePage": "Game",
"Info": "Info", "Info": "Info",
"Maximum": "Max",
"MenuPage": "Menu", "MenuPage": "Menu",
"MenusTab": "Menus", "MenusTab": "Menus",
"Minimum": "Min",
"PedPage": "Ped", "PedPage": "Ped",
"PlayerPage": "Player", "PlayerPage": "Player",
"Search": "Search", "Search": "Search",
"SetValue": "Set value",
"SpawnTab": "Spawn", "SpawnTab": "Spawn",
"TeleportPage": "Teleport", "TeleportPage": "Teleport",
"VehiclePage": "Vehicle", "VehiclePage": "Vehicle",

View File

@ -430,11 +430,11 @@ void Game::ShowPage()
if (ImGui::BeginTabBar("Game", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll)) if (ImGui::BeginTabBar("Game", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
{ {
if (ImGui::BeginTabItem(TEXT("Windo.CheckboxTab"))) if (ImGui::BeginTabItem(TEXT("Window.CheckboxTab")))
{ {
ImGui::Spacing(); ImGui::Spacing();
ImGui::Columns(2, nullptr, false); ImGui::Columns(2, nullptr, false);
if (ImGui::Checkbox(TEXT("Game.DsiableCheats"), &m_bDisableCheats)) if (ImGui::Checkbox(TEXT("Game.DisableCheats"), &m_bDisableCheats))
{ {
if (m_bDisableCheats) if (m_bDisableCheats)
{ {
@ -573,7 +573,7 @@ void Game::ShowPage()
ImGui::Columns(1); ImGui::Columns(1);
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem(TEXT("Game.MenusTab"))) if (ImGui::BeginTabItem(TEXT("Window.MenusTab")))
{ {
#ifdef GTASA #ifdef GTASA
if (ImGui::CollapsingHeader(TEXT("Game.CurrentDay"))) if (ImGui::CollapsingHeader(TEXT("Game.CurrentDay")))

View File

@ -224,7 +224,7 @@ void Player::Init()
{ {
if (m_bGodMode) if (m_bGodMode)
{ {
SetHelpMessage("God mode disabled", false, false, false); SetHelpMessage(TEXT("Player.GodDisabled"));
#ifdef GTASA #ifdef GTASA
patch::Set<bool>(0x96916D, m_bGodMode, false); patch::Set<bool>(0x96916D, m_bGodMode, false);
player->m_nPhysicalFlags.bBulletProof = 0; player->m_nPhysicalFlags.bBulletProof = 0;
@ -249,7 +249,7 @@ void Player::Init()
} }
else else
{ {
SetHelpMessage("God mode enabled", false, false, false); SetHelpMessage(TEXT("Player.GodEnabled"));
m_bGodMode = true; m_bGodMode = true;
} }
} }
@ -351,7 +351,7 @@ void Player::ChangePlayerModel(std::string& cat, std::string& key, std::string&
// CStreaming::LoadAllRequestedModels(true); // CStreaming::LoadAllRequestedModels(true);
// player->SetModelIndex(109); // player->SetModelIndex(109);
// CStreaming::SetMissionDoesntRequireSpecialChar(109); // CStreaming::SetMissionDoesntRequireSpecialChar(109);
SetHelpMessage("Spawning special peds isn't implemented yet.", false, false, false); SetHelpMessage(TEXT("Player.SpecialNotImplement"));
} }
else else
{ {
@ -375,16 +375,16 @@ void Player::ShowPage()
#endif #endif
CPlayerInfo *pInfo = &CWorld::Players[CWorld::PlayerInFocus]; CPlayerInfo *pInfo = &CWorld::Players[CWorld::PlayerInFocus];
if (ImGui::Button("Copy coordinates", ImVec2(Ui::GetSize(2)))) if (ImGui::Button(TEXT("Player.CopyCoordinates"), ImVec2(Ui::GetSize(2))))
{ {
CVector pos = pPlayer->GetPosition(); CVector pos = pPlayer->GetPosition();
std::string text = std::to_string(pos.x) + ", " + std::to_string(pos.y) + ", " + std::to_string(pos.z); std::string text = std::to_string(pos.x) + ", " + std::to_string(pos.y) + ", " + std::to_string(pos.z);
ImGui::SetClipboardText(text.c_str()); ImGui::SetClipboardText(text.c_str());
SetHelpMessage("Coordinates copied", false, false, false); SetHelpMessage(TEXT("Player.CoordCopied"));
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Suicide", ImVec2(Ui::GetSize(2)))) if (ImGui::Button(TEXT("Player.Suicide"), ImVec2(Ui::GetSize(2))))
{ {
pPlayer->m_fHealth = 0.0; pPlayer->m_fHealth = 0.0;
} }
@ -393,7 +393,7 @@ void Player::ShowPage()
if (ImGui::BeginTabBar("Player", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll)) if (ImGui::BeginTabBar("Player", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
{ {
if (ImGui::BeginTabItem("Checkboxes")) if (ImGui::BeginTabItem(TEXT("Window.CheckboxTab")))
{ {
ImGui::Spacing(); ImGui::Spacing();
@ -402,33 +402,26 @@ void Player::ShowPage()
ImGui::Columns(2, 0, false); ImGui::Columns(2, 0, false);
#ifdef GTASA #ifdef GTASA
Ui::CheckboxAddress("Bounty on yourself", 0x96913F); Ui::CheckboxAddress(TEXT("Player.BountyYourself"), 0x96913F);
ImGui::BeginDisabled(m_TopDownCamera::m_bEnabled); ImGui::BeginDisabled(m_TopDownCamera::m_bEnabled);
if (Ui::CheckboxWithHint("Drunk effect", &m_bDrunkEffect)) if (Ui::CheckboxWithHint(TEXT("Player.DrunkEffect"), &m_bDrunkEffect))
{ {
if (!m_bDrunkEffect) if (!m_bDrunkEffect)
{ {
Command<eScriptCommands::COMMAND_SET_PLAYER_DRUNKENNESS> (0, 0); Command<eScriptCommands::COMMAND_SET_PLAYER_DRUNKENNESS> (0, 0);
} }
} }
if (Ui::CheckboxWithHint("Fast Sprint", &m_bFastSprint, "Best to enable God Mode & Infinite sprint too")) if (Ui::CheckboxWithHint(TEXT("Player.FastSprint"), &m_bFastSprint, TEXT("Player.FastSprintTip")))
{ {
if(m_bFastSprint) patch::Set<float>(0x8D2458, m_bFastSprint ? 0.1f : 5.0f);
{
patch::Set<float>(0x8D2458, 0.1f);
}
else
{
patch::Set<float>(0x8D2458, 5.0f);
}
} }
ImGui::EndDisabled(); ImGui::EndDisabled();
#endif #endif
Ui::CheckboxAddress("Free healthcare", BY_GAME((int)&pInfo->m_bFreeHealthCare, Ui::CheckboxAddress(TEXT("Player.FreeHealthcare"), BY_GAME((int)&pInfo->m_bFreeHealthCare,
(int)&pInfo->m_bFreeHealthCare, (int)&pInfo->m_bGetOutOfHospitalFree)); (int)&pInfo->m_bFreeHealthCare, (int)&pInfo->m_bGetOutOfHospitalFree));
if (Ui::CheckboxWithHint("God mode", &m_bGodMode)) if (Ui::CheckboxWithHint(TEXT("Player.GodMode"), &m_bGodMode))
{ {
#ifdef GTASA #ifdef GTASA
patch::Set<bool>(0x96916D, m_bGodMode, false); patch::Set<bool>(0x96916D, m_bGodMode, false);
@ -451,39 +444,39 @@ void Player::ShowPage()
pPlayer->m_nEntityFlags.bMeleeProof = m_bGodMode; pPlayer->m_nEntityFlags.bMeleeProof = m_bGodMode;
#endif #endif
} }
Ui::CheckboxWithHint("Health regeneration", &m_bHealthRegen, "Player heals if not taken damage for 5 seconds"); Ui::CheckboxWithHint(TEXT("Player.HealthRegen"), &m_bHealthRegen, TEXT("Player.HealthRegenTip"));
#ifdef GTASA #ifdef GTASA
Ui::CheckboxAddress("Higher cycle jumps", 0x969161); Ui::CheckboxAddress(TEXT("Player.CycleJump"), 0x969161);
Ui::CheckboxAddress("Infinite oxygen", 0x96916E); Ui::CheckboxAddress(TEXT("Player.InfO2"), 0x96916E);
if (Ui::CheckboxBitFlag("Invisible player", pPlayer->m_nPedFlags.bDontRender)) if (Ui::CheckboxBitFlag(TEXT("Player.InvisPlayer"), pPlayer->m_nPedFlags.bDontRender))
{ {
pPlayer->m_nPedFlags.bDontRender = (pPlayer->m_nPedFlags.bDontRender == 1) ? 0 : 1; pPlayer->m_nPedFlags.bDontRender = (pPlayer->m_nPedFlags.bDontRender == 1) ? 0 : 1;
} }
Ui::CheckboxAddress("Infinite sprint", 0xB7CEE4); Ui::CheckboxAddress(TEXT("Player.InfSprint"), 0xB7CEE4);
#else #else
Ui::CheckboxAddress("Infinite sprint", BY_GAME(NULL, (int)&pInfo->m_bNeverGetsTired, (int)&pInfo->m_bInfiniteSprint)); Ui::CheckboxAddress(TEXT("Player.InfSprint"), BY_GAME(NULL, (int)&pInfo->m_bNeverGetsTired, (int)&pInfo->m_bInfiniteSprint));
#endif #endif
ImGui::NextColumn(); ImGui::NextColumn();
#ifdef GTASA #ifdef GTASA
if (Ui::CheckboxBitFlag("Lock control", pad->bPlayerSafe)) if (Ui::CheckboxBitFlag(TEXT("Player.LockControl"), pad->bPlayerSafe))
{ {
pad->bPlayerSafe = (pad->bPlayerSafe == 1) ? 0 : 1; pad->bPlayerSafe = (pad->bPlayerSafe == 1) ? 0 : 1;
} }
Ui::CheckboxAddressEx("Max sex appeal", 0x969180, 1, 0); Ui::CheckboxAddressEx(TEXT("Player.MaxAppeal"), 0x969180, 1, 0);
Ui::CheckboxAddress("Mega jump", 0x96916C); Ui::CheckboxAddress(TEXT("Player.MegaJump"), 0x96916C);
Ui::CheckboxAddress("Mega punch", 0x969173); Ui::CheckboxAddress(TEXT("Player.MegaPunch"), 0x969173);
Ui::CheckboxAddress("Never get hungry", 0x969174); Ui::CheckboxAddress(TEXT("Player.NeverGetHungry"), 0x969174);
bool never_wanted = patch::Get<bool>(0x969171, false); bool never_wanted = patch::Get<bool>(0x969171, false);
if (Ui::CheckboxWithHint("Never wanted", &never_wanted)) if (Ui::CheckboxWithHint(TEXT("Player.NeverWanted"), &never_wanted))
{ {
CCheat::NotWantedCheat(); CCheat::NotWantedCheat();
} }
#else #else
static bool neverWanted = false; static bool neverWanted = false;
if (Ui::CheckboxWithHint("Never wanted", &neverWanted)) if (Ui::CheckboxWithHint(TEXT("Player.NeverWanted"), &neverWanted))
{ {
if (neverWanted) if (neverWanted)
{ {
@ -511,19 +504,19 @@ void Player::ShowPage()
} }
} }
#endif #endif
Ui::CheckboxAddress("No arrest fee", (int)&pInfo->m_bGetOutOfJailFree); Ui::CheckboxAddress(TEXT("Player.NoFee"), (int)&pInfo->m_bGetOutOfJailFree);
Ui::CheckboxWithHint("Respawn die location", &m_KeepPosition::m_bEnabled, "Respawn to the location you died from"); Ui::CheckboxWithHint(TEXT("Player.RespawnDieLoc"), &m_KeepPosition::m_bEnabled, TEXT("Player.RespawnDieLocTip"));
ImGui::Columns(1); ImGui::Columns(1);
ImGui::NewLine(); ImGui::NewLine();
ImGui::TextWrapped("Player flags,"); ImGui::TextWrapped(TEXT("Player.PlayerFlags"));
ImGui::Columns(2, 0, false); ImGui::Columns(2, 0, false);
bool state = BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof, bool state = BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof,
pPlayer->m_nEntityFlags.bBulletProof); pPlayer->m_nEntityFlags.bBulletProof);
if (Ui::CheckboxWithHint("Bullet proof", &state, nullptr, m_bGodMode)) if (Ui::CheckboxWithHint(TEXT("Player.BulletProof"), &state, nullptr, m_bGodMode))
{ {
BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof, BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof,
pPlayer->m_nEntityFlags.bBulletProof) = state; pPlayer->m_nEntityFlags.bBulletProof) = state;
@ -531,7 +524,7 @@ void Player::ShowPage()
state = BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof, state = BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof,
pPlayer->m_nEntityFlags.bCollisionProof); pPlayer->m_nEntityFlags.bCollisionProof);
if (Ui::CheckboxWithHint("Collision proof", &state, nullptr, m_bGodMode)) if (Ui::CheckboxWithHint(TEXT("Player.CollisionProof"), &state, nullptr, m_bGodMode))
{ {
BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof, BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof,
pPlayer->m_nEntityFlags.bCollisionProof) = state; pPlayer->m_nEntityFlags.bCollisionProof) = state;
@ -539,7 +532,7 @@ void Player::ShowPage()
state = BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof, state = BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof,
pPlayer->m_nEntityFlags.bExplosionProof); pPlayer->m_nEntityFlags.bExplosionProof);
if (Ui::CheckboxWithHint("Explosion proof", &state, nullptr, m_bGodMode)) if (Ui::CheckboxWithHint(TEXT("Player.ExplosionProof"), &state, nullptr, m_bGodMode))
{ {
BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof, BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof,
pPlayer->m_nEntityFlags.bExplosionProof) = state; pPlayer->m_nEntityFlags.bExplosionProof) = state;
@ -549,7 +542,7 @@ void Player::ShowPage()
state = BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof, state = BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof,
pPlayer->m_nEntityFlags.bFireProof); pPlayer->m_nEntityFlags.bFireProof);
if (Ui::CheckboxWithHint("Fire proof", &state, nullptr, m_bGodMode)) if (Ui::CheckboxWithHint(TEXT("Player.FireProof"), &state, nullptr, m_bGodMode))
{ {
BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof, BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof,
pPlayer->m_nEntityFlags.bFireProof) = state; pPlayer->m_nEntityFlags.bFireProof) = state;
@ -557,7 +550,7 @@ void Player::ShowPage()
state = BY_GAME(pPlayer->m_nPhysicalFlags.bMeeleProof, pPlayer->m_nFlags.bMeleeProof, state = BY_GAME(pPlayer->m_nPhysicalFlags.bMeeleProof, pPlayer->m_nFlags.bMeleeProof,
pPlayer->m_nEntityFlags.bMeleeProof); pPlayer->m_nEntityFlags.bMeleeProof);
if (Ui::CheckboxWithHint("Meele proof", &state, nullptr, m_bGodMode)) if (Ui::CheckboxWithHint(TEXT("Player.MeeleProof"), &state, nullptr, m_bGodMode))
{ {
BY_GAME(pPlayer->m_nPhysicalFlags.bMeeleProof, pPlayer->m_nFlags.bMeleeProof, BY_GAME(pPlayer->m_nPhysicalFlags.bMeeleProof, pPlayer->m_nFlags.bMeleeProof,
pPlayer->m_nEntityFlags.bMeleeProof) = state; pPlayer->m_nEntityFlags.bMeleeProof) = state;
@ -567,38 +560,44 @@ void Player::ShowPage()
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Menus")) if (ImGui::BeginTabItem(TEXT("Window.MenusTab")))
{ {
ImGui::BeginChild("PlayerMenus"); ImGui::BeginChild("PlayerMenus");
Ui::EditReference("Armour", pPlayer->m_fArmour, 0, 100, 150); Ui::EditReference(TEXT("Player.Armour"), pPlayer->m_fArmour, 0, 100, 150);
#ifdef GTASA #ifdef GTASA
if (ImGui::CollapsingHeader("Body")) if (ImGui::CollapsingHeader(TEXT("Player.Body")))
{ {
if (pPlayer->m_nModelIndex == 0) if (pPlayer->m_nModelIndex == 0)
{ {
ImGui::Columns(3, 0, false); ImGui::Columns(3, 0, false);
if (ImGui::RadioButton("Fat", &m_nUiBodyState, 2)) if (ImGui::RadioButton(TEXT("Player.Fat"), &m_nUiBodyState, 2))
{
CCheat::FatCheat(); CCheat::FatCheat();
}
ImGui::NextColumn(); ImGui::NextColumn();
if (ImGui::RadioButton("Muscle", &m_nUiBodyState, 1)) if (ImGui::RadioButton(TEXT("Player.Muscle"), &m_nUiBodyState, 1))
{
CCheat::MuscleCheat(); CCheat::MuscleCheat();
}
ImGui::NextColumn(); ImGui::NextColumn();
if (ImGui::RadioButton("Skinny", &m_nUiBodyState, 0)) if (ImGui::RadioButton(TEXT("Player.Skinny"), &m_nUiBodyState, 0))
{
CCheat::SkinnyCheat(); CCheat::SkinnyCheat();
}
ImGui::Columns(1); ImGui::Columns(1);
} }
else else
{ {
ImGui::TextWrapped("You need to be in CJ skin."); ImGui::TextWrapped(TEXT("Player.NeedCJSkin"));
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::Button("Change to CJ skin", ImVec2(Ui::GetSize(1)))) if (ImGui::Button(TEXT("Player.ChangeToCJ"), ImVec2(Ui::GetSize(1))))
{ {
pPlayer->SetModelIndex(0); pPlayer->SetModelIndex(0);
Util::ClearCharTasksVehCheck(pPlayer); Util::ClearCharTasksVehCheck(pPlayer);
@ -608,39 +607,39 @@ void Player::ShowPage()
ImGui::Separator(); ImGui::Separator();
} }
Ui::EditStat("Energy", STAT_ENERGY); Ui::EditStat(TEXT("Player.Energy"), STAT_ENERGY);
Ui::EditStat("Fat", STAT_FAT); Ui::EditStat(TEXT("Player.Fat"), STAT_FAT);
#endif #endif
Ui::EditReference("Health", pPlayer->m_fHealth, 0, 100, BY_GAME(static_cast<int>(pPlayer->m_fMaxHealth), 100, 100)); Ui::EditReference(TEXT("Player.Health"), pPlayer->m_fHealth, 0, 100, BY_GAME(static_cast<int>(pPlayer->m_fMaxHealth), 100, 100));
#ifdef GTASA #ifdef GTASA
Ui::EditStat("Lung capacity", STAT_LUNG_CAPACITY); Ui::EditStat(TEXT("Player.LungCapacity"), STAT_LUNG_CAPACITY);
Ui::EditStat("Max health", STAT_MAX_HEALTH, 0, 569, 1450); Ui::EditStat(TEXT("Player.MaxHealth"), STAT_MAX_HEALTH, 0, 569, 1450);
Ui::EditAddress<int>("Money", 0xB7CE50, -99999999, 0, 99999999); Ui::EditAddress<int>(TEXT("Player.Money"), 0xB7CE50, -99999999, 0, 99999999);
#else #else
int money = pInfo->m_nMoney; int money = pInfo->m_nMoney;
Ui::EditAddress<int>("Money", (int)&money, -9999999, 0, 99999999); Ui::EditAddress<int>(TEXT("Player.Money"), (int)&money, -9999999, 0, 99999999);
pInfo->m_nMoney = money; pInfo->m_nMoney = money;
pInfo->m_nDisplayMoney = money; pInfo->m_nDisplayMoney = money;
#endif #endif
#ifdef GTASA #ifdef GTASA
Ui::EditStat("Muscle", STAT_MUSCLE); Ui::EditStat(TEXT("Player.Muscle"), STAT_MUSCLE);
Ui::EditStat("Respect", STAT_RESPECT); Ui::EditStat(TEXT("Player.Respect"), STAT_RESPECT);
Ui::EditStat("Stamina", STAT_STAMINA); Ui::EditStat(TEXT("Player.Stamina"), STAT_STAMINA);
if (ImGui::CollapsingHeader("Top down camera")) if (ImGui::CollapsingHeader(TEXT("Player.TopDownCamera")))
{ {
if (ImGui::Checkbox("Enabled", &m_TopDownCamera::m_bEnabled)) if (ImGui::Checkbox(TEXT("Window.Enabled"), &m_TopDownCamera::m_bEnabled))
{ {
Command<Commands::RESTORE_CAMERA_JUMPCUT>(); Command<Commands::RESTORE_CAMERA_JUMPCUT>();
} }
ImGui::Spacing(); ImGui::Spacing();
ImGui::SliderFloat("Camera zoom", &m_TopDownCamera::m_fOffset, 20.0f, 60.0f); ImGui::SliderFloat(TEXT("Player.CameraZoom"), &m_TopDownCamera::m_fOffset, 20.0f, 60.0f);
ImGui::Spacing(); ImGui::Spacing();
ImGui::Separator(); ImGui::Separator();
} }
#endif #endif
if (ImGui::CollapsingHeader("Wanted level")) if (ImGui::CollapsingHeader(TEXT("Player.WantedLevel")))
{ {
#ifdef GTASA #ifdef GTASA
int val = pPlayer->m_pPlayerData->m_pWanted->m_nWantedLevel; int val = pPlayer->m_pPlayerData->m_pWanted->m_nWantedLevel;
@ -652,16 +651,16 @@ void Player::ShowPage()
#endif #endif
ImGui::Columns(3, 0, false); ImGui::Columns(3, 0, false);
ImGui::Text("Min: 0"); ImGui::Text("%s: 0", TEXT("Window.Minimum"));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("Def: 0"); ImGui::Text("%s: 0", TEXT("Window.Default"));
ImGui::NextColumn(); ImGui::NextColumn();
ImGui::Text("Max: %d", max_wl); ImGui::Text("%s: %d", TEXT("Window.Maximum"), max_wl);
ImGui::Columns(1); ImGui::Columns(1);
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::InputInt("Set value##Wanted level", &val)) if (ImGui::InputInt(TEXT("Window.SetValue"), &val))
{ {
#ifdef GTASA #ifdef GTASA
pPlayer->CheatWantedLevel(val); pPlayer->CheatWantedLevel(val);
@ -673,7 +672,7 @@ void Player::ShowPage()
} }
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::Button("Minimum##Wanted level", Ui::GetSize(3))) if (ImGui::Button(TEXT("Window.Minimum"), Ui::GetSize(3)))
{ {
#ifdef GTASA #ifdef GTASA
pPlayer->CheatWantedLevel(0); pPlayer->CheatWantedLevel(0);
@ -686,7 +685,7 @@ void Player::ShowPage()
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Default##Wanted level", Ui::GetSize(3))) if (ImGui::Button(TEXT("Window.Default"), Ui::GetSize(3)))
{ {
#ifdef GTASA #ifdef GTASA
pPlayer->CheatWantedLevel(0); pPlayer->CheatWantedLevel(0);
@ -699,7 +698,7 @@ void Player::ShowPage()
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Maximum##Wanted level", Ui::GetSize(3))) if (ImGui::Button(TEXT("Window.Maximum"), Ui::GetSize(3)))
{ {
#ifdef GTASA #ifdef GTASA
pPlayer->CheatWantedLevel(max_wl); pPlayer->CheatWantedLevel(max_wl);
@ -718,22 +717,21 @@ void Player::ShowPage()
} }
#ifdef GTASA #ifdef GTASA
if (ImGui::BeginTabItem("Appearance")) if (ImGui::BeginTabItem(TEXT("Player.AppearanceTab")))
{ {
ImGui::Spacing(); ImGui::Spacing();
if (Ui::CheckboxWithHint("Aim skin changer", &m_bAimSkinChanger, if (Ui::CheckboxWithHint(TEXT("Player.AimSkinChanger"), &m_bAimSkinChanger, TEXT("Player.AimSkinChangerTip") + aimSkinChanger.Pressed()))
(("Changes to the ped, player is targeting with a weapon.\nTo use aim a ped with a weapon and press ") {
+ aimSkinChanger.Pressed())))
gConfig.SetValue("aim_skin_changer", m_bAimSkinChanger); gConfig.SetValue("aim_skin_changer", m_bAimSkinChanger);
}
if (ImGui::BeginTabBar("AppearanceTabBar")) if (ImGui::BeginTabBar("AppearanceTabBar"))
{ {
if (ImGui::BeginTabItem("Clothes")) if (ImGui::BeginTabItem(TEXT("Player.ClothesTab")))
{ {
if (pPlayer->m_nModelIndex == 0) if (pPlayer->m_nModelIndex == 0)
{ {
Ui::DrawImages(m_ClothData, ChangePlayerCloth, nullptr, Ui::DrawImages(m_ClothData, ChangePlayerCloth, nullptr, [](std::string str)
[](std::string str)
{ {
std::stringstream ss(str); std::stringstream ss(str);
std::string temp; std::string temp;
@ -746,10 +744,10 @@ void Player::ShowPage()
} }
else else
{ {
ImGui::TextWrapped("You need to be in CJ skin."); ImGui::TextWrapped(TEXT("Player.NeedCJSkin"));
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::Button("Change to CJ skin", ImVec2(Ui::GetSize(1)))) if (ImGui::Button(TEXT("Player.ChangeToCJ"), ImVec2(Ui::GetSize(1))))
{ {
pPlayer->SetModelIndex(0); pPlayer->SetModelIndex(0);
Util::ClearCharTasksVehCheck(pPlayer); Util::ClearCharTasksVehCheck(pPlayer);
@ -758,14 +756,14 @@ void Player::ShowPage()
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (pPlayer->m_nModelIndex == 0 if (pPlayer->m_nModelIndex == 0
&& ImGui::BeginTabItem("Remove Clothes")) && ImGui::BeginTabItem(TEXT("Player.RemoveClothesTab")))
{ {
ImGui::TextWrapped("If CJ is wearing a full suit, click 'Extras' or 'Remove all' to remove it."); ImGui::TextWrapped(TEXT("Player.ClothesTip"));
ImGui::Spacing(); ImGui::Spacing();
ImGui::BeginChild("ClothesRemove"); ImGui::BeginChild("ClothesRemove");
size_t count = 0; size_t count = 0;
if (ImGui::Button("Remove all", ImVec2(Ui::GetSize(2)))) if (ImGui::Button(TEXT("Player.RemoveAll"), ImVec2(Ui::GetSize(2))))
{ {
CPlayerPed* player = FindPlayerPed(); CPlayerPed* player = FindPlayerPed();
for (uint i = 0; i < 18; i++) for (uint i = 0; i < 18; i++)
@ -793,7 +791,7 @@ void Player::ShowPage()
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Ped skins")) if (ImGui::BeginTabItem(TEXT("Player.PedSkinsTab")))
{ {
Ui::DrawImages(Ped::m_PedData, ChangePlayerModel, nullptr, Ui::DrawImages(Ped::m_PedData, ChangePlayerModel, nullptr,
[](std::string str) [](std::string str)
@ -802,19 +800,18 @@ void Player::ShowPage()
}); });
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Custom skins")) if (ImGui::BeginTabItem(TEXT("Player.CustomSkinsTab")))
{ {
ImGui::Spacing(); ImGui::Spacing();
if (m_bModloaderInstalled) if (m_bModloaderInstalled)
{ {
Ui::FilterWithHint("Search", m_ClothData.m_Filter, Ui::FilterWithHint(TEXT("Window.Search"), m_ClothData.m_Filter,
std::string("Total skins: " + std::to_string(m_CustomSkins::m_List.size())) std::string(TEXT("Player.TotalSkins") + std::to_string(m_CustomSkins::m_List.size()))
.c_str()); .c_str());
Ui::ShowTooltip("Place your dff & txd files inside 'modloader/CustomSkins'"); Ui::ShowTooltip(TEXT("Player.CustomSkinsDirTip"));
ImGui::Spacing(); ImGui::Spacing();
ImGui::TextWrapped( ImGui::TextWrapped(TEXT("Player.CustomSkinsTip"));
"Note: Your txd & dff names can't exceed 8 characters. Don't change names while the game is running.");
ImGui::Spacing(); ImGui::Spacing();
for (std::string name : m_CustomSkins::m_List) for (std::string name : m_CustomSkins::m_List)
{ {
@ -829,19 +826,9 @@ void Player::ShowPage()
} }
else else
{ {
ImGui::TextWrapped( ImGui::TextWrapped(TEXT("Player.CustomSkinTutorial"));
"Custom skin allows to change player skins without replacing any existing game ped skins.\n\
Steps to enable 'Custom Skins',\n\n\
1. Download & install modloader\n\
2. Create a folder inside 'modloader' folder with the name 'CustomSkins'\n\
3. Download ped skins online ( .dff & .txd files) and put them inside.\n\
4. Restart your game.\n\n\n\
Limitations:\n\
1. Your .dff & .txd file names must not exceed 8 characters.\n\
2. Do not rename them while the game is running\n\
\nDoing so will crash your game.");
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::Button("Download Modloader", ImVec2(Ui::GetSize(1)))) if (ImGui::Button(TEXT("Player.DownloadModloader"), ImVec2(Ui::GetSize(1))))
ShellExecute(NULL, "open", "https://gtaforums.com/topic/669520-mod-loader/", NULL, NULL, ShellExecute(NULL, "open", "https://gtaforums.com/topic/669520-mod-loader/", NULL, NULL,
SW_SHOWNORMAL); SW_SHOWNORMAL);
} }
@ -852,14 +839,14 @@ Limitations:\n\
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
#else #else
if (ImGui::BeginTabItem("Skins")) if (ImGui::BeginTabItem(TEXT("Player.SkinsTab")))
{ {
ImGui::Spacing(); ImGui::Spacing();
#ifdef GTA3 #ifdef GTA3
ImGui::TextWrapped("Player must be frozen to change skins."); ImGui::TextWrapped(TEXT("Player.SkinChangeFrozen"));
CPad::GetPad(0)->m_bDisablePlayerControls = true; CPad::GetPad(0)->m_bDisablePlayerControls = true;
#else #else
ImGui::TextWrapped("Only contains the skins that works."); ImGui::TextWrapped(TEXT("Player.WorkSkinOnly"));
#endif #endif
Ui::DrawJSON(skinData, ChangePlayerModel, nullptr); Ui::DrawJSON(skinData, ChangePlayerModel, nullptr);
ImGui::EndTabItem(); ImGui::EndTabItem();

View File

@ -2,5 +2,5 @@
#define MENU_NAME "Cheat Menu" #define MENU_NAME "Cheat Menu"
#define MENU_VERSION_NUMBER "3.2" #define MENU_VERSION_NUMBER "3.2"
#define MENU_VERSION MENU_VERSION_NUMBER"-beta" #define MENU_VERSION MENU_VERSION_NUMBER"-beta"
#define BUILD_NUMBER "20220221" #define BUILD_NUMBER "20220226"
#define MENU_TITLE MENU_NAME " v" MENU_VERSION #define MENU_TITLE MENU_NAME " v" MENU_VERSION