diff --git a/resource/common/locale/English.toml b/resource/common/locale/English.toml index bdd7b70..a116628 100644 --- a/resource/common/locale/English.toml +++ b/resource/common/locale/English.toml @@ -368,7 +368,7 @@ NeedCJSkin = "You need to be in CJ skin" NeverGetHungry = "Never get hungry" NeverWanted = "Never wanted" NoFee = "No arrest fee" -NoUndress = "Don't lose clothes" +NoUndress = "Keep outfits" NoUndressTip = "Don't lose clothes after being busted/wasted" PedSkinsTab = "Ped skins" PlayerFlags = "Player flags," diff --git a/src/game.cpp b/src/game.cpp index 264f036..a2fea55 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -31,8 +31,6 @@ void Freecam::Process() m_bRadarState = patch::Get(BY_GAME(0xBA676C, 0xA10AB6, NULL)); // radar CVector playerPos = player->GetPosition(); - CPad::GetPad(0)->DisablePlayerControls = true; - Command(playerPos.x, playerPos.y, playerPos.z, &m_nPed); m_pPed = CPools::GetPed(m_nPed); @@ -191,8 +189,6 @@ void Freecam::Clear() patch::Set(BY_GAME(0xBA6769, 0x86963A, NULL), m_bHudState); // hud patch::Set(BY_GAME(0xBA676C, 0xA10AB6, NULL), m_bRadarState); // radar - CPad::GetPad(0)->DisablePlayerControls = false; - Command(m_nPed); m_pPed = nullptr; diff --git a/src/pch.cpp b/src/pch.cpp index 50f923e..09211f0 100644 --- a/src/pch.cpp +++ b/src/pch.cpp @@ -5,10 +5,10 @@ DataStore gConfig = DataStore(FILE_NAME, true); ResourceStore gTextureList { "misc", eResourceType::TYPE_IMAGE, ImVec2(100, 80) }; Hotkey aimSkinChanger {VK_RETURN, VK_RETURN, "AimSkinChanger"}; Hotkey freeCam {VK_F6, VK_F6, "Freecam.Toggle"}; -Hotkey freeCamForward {VK_KEY_W, VK_KEY_W, "Freecam.Forward"};; -Hotkey freeCamBackward {VK_KEY_S, VK_KEY_S, "Freecam.Backward"};; -Hotkey freeCamLeft {VK_KEY_A, VK_KEY_A, "Freecam.Left"};; -Hotkey freeCamRight {VK_KEY_D, VK_KEY_D, "Freecam.Right"}; +Hotkey freeCamForward {VK_KEY_I, VK_KEY_I, "Freecam.Forward"};; +Hotkey freeCamBackward {VK_KEY_K, VK_KEY_K, "Freecam.Backward"};; +Hotkey freeCamLeft {VK_KEY_J, VK_KEY_J, "Freecam.Left"};; +Hotkey freeCamRight {VK_KEY_L, VK_KEY_L, "Freecam.Right"}; Hotkey freeCamTeleport {VK_RETURN, VK_RETURN, "Freecam.Teleport"}; Hotkey commandWindow {VK_LCONTROL, VK_KEY_C, "CommandWindowToggle"};; Hotkey fixVeh {VK_NONE, VK_NONE, "Vehicle.Fix"}; diff --git a/src/player.cpp b/src/player.cpp index 12d1038..4565be3 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -447,39 +447,6 @@ void Player::ShowPage() patch::Set(0x8D2458, m_bFastSprint ? 0.1f : 5.0f); } ImGui::EndDisabled(); -#endif -#ifdef GTAVC - if (Widget::Checkbox(TEXT("Player.NoUndress"), &m_bNoUndress, TEXT("Player.NoUndressTip"))) - { - if (m_bNoUndress) - { - // pop ecx - patch::SetUChar(0x42BDC5, 0x59); - patch::SetUChar(0x42C1B0, 0x59); - patch::SetUChar(0x42C3B2, 0x59); - patch::SetUChar(0x42BDC5, 0x59); - patch::SetUChar(0x42C1B0, 0x59); - patch::SetUChar(0x42C3B2, 0x59); - // nop Undress() - patch::RedirectShortJump(0x42BDC6, (void*)0x42BDE1); - patch::RedirectShortJump(0x42C1B1, (void*)0x42C1CC); - patch::RedirectShortJump(0x42C3B3, (void*)0x42C3CE); - // nop Dress() - patch::RedirectShortJump(0x42BDC6, (void*)0x42BE05); - patch::RedirectShortJump(0x42C1B1, (void*)0x42C1F0); - patch::RedirectShortJump(0x42C3B3, (void*)0x42C3F2); - } - else - { - // restore - patch::SetRaw(0x42BDC5, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); - patch::SetRaw(0x42C1B0, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); - patch::SetRaw(0x42C3B2, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); - patch::SetRaw(0x42BDC5, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); - patch::SetRaw(0x42C1B0, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); - patch::SetRaw(0x42C3B2, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); - } - } #endif Widget::CheckboxAddr(TEXT("Player.FreeHealthcare"), (int)&pInfo->m_bGetOutOfHospitalFree); @@ -559,7 +526,39 @@ void Player::ShowPage() #else Widget::CheckboxAddr(TEXT("Player.InfSprint"), (int)&pInfo->m_bInfiniteSprint); #endif - + #ifdef GTAVC + if (Widget::Checkbox(TEXT("Player.NoUndress"), &m_bNoUndress, TEXT("Player.NoUndressTip"))) + { + if (m_bNoUndress) + { + // pop ecx + patch::SetUChar(0x42BDC5, 0x59); + patch::SetUChar(0x42C1B0, 0x59); + patch::SetUChar(0x42C3B2, 0x59); + patch::SetUChar(0x42BDC5, 0x59); + patch::SetUChar(0x42C1B0, 0x59); + patch::SetUChar(0x42C3B2, 0x59); + // nop Undress() + patch::RedirectShortJump(0x42BDC6, (void*)0x42BDE1); + patch::RedirectShortJump(0x42C1B1, (void*)0x42C1CC); + patch::RedirectShortJump(0x42C3B3, (void*)0x42C3CE); + // nop Dress() + patch::RedirectShortJump(0x42BDC6, (void*)0x42BE05); + patch::RedirectShortJump(0x42C1B1, (void*)0x42C1F0); + patch::RedirectShortJump(0x42C3B3, (void*)0x42C3F2); + } + else + { + // restore + patch::SetRaw(0x42BDC5, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); + patch::SetRaw(0x42C1B0, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); + patch::SetRaw(0x42C3B2, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); + patch::SetRaw(0x42BDC5, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); + patch::SetRaw(0x42C1B0, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); + patch::SetRaw(0x42C3B2, (void*)"\x0F\xB6\x05\xFB\x0A\xA1", 6); + } + } +#endif ImGui::NextColumn(); #ifdef GTASA