Add move speed toggle to freecam

This commit is contained in:
Grinch_ 2022-07-07 13:32:37 +06:00
parent a9ca03253c
commit 44f1b2067e
3 changed files with 45 additions and 29 deletions

View File

@ -67,7 +67,7 @@ ForbiddenWantedLevel = "Forbidden area wl"
ForbiddenWantedLevelText = "Wanted levels that appears outside of LS without completing missions" ForbiddenWantedLevelText = "Wanted levels that appears outside of LS without completing missions"
FPSLimit = "FPS limit" FPSLimit = "FPS limit"
Freecam = "Freecam" Freecam = "Freecam"
FreecamTip = "Press Enter to teleport player to camera location" FreecamTip = "Shortcuts:\n\nEnter : Teleport player to camera\nMouse wheel : Zoom\nCtrl+ mouse wheel : Movement speed"
FreePNS = "Free pay n spray" FreePNS = "Free pay n spray"
FreezeGame = "Freeze game" FreezeGame = "Freeze game"
FreezeGameTime = "Freeze game time" FreezeGameTime = "Freeze game time"

View File

@ -121,6 +121,13 @@ void Freecam::Process()
} }
if (CPad::NewMouseControllerState.wheelUp) if (CPad::NewMouseControllerState.wheelUp)
{
if (KeyPressed(VK_LCONTROL) && m_nMul != 10)
{
++m_nMul;
SetHelpMessage(std::to_string(m_nMul).c_str());
}
else
{ {
if (m_fFOV > 10.0f) if (m_fFOV > 10.0f)
{ {
@ -130,8 +137,16 @@ void Freecam::Process()
TheCamera.LerpFOV(TheCamera.FindCamFOV(), m_fFOV, 250, true); TheCamera.LerpFOV(TheCamera.FindCamFOV(), m_fFOV, 250, true);
Command<Commands::CAMERA_PERSIST_FOV>(true); Command<Commands::CAMERA_PERSIST_FOV>(true);
} }
}
if (CPad::NewMouseControllerState.wheelDown) if (CPad::NewMouseControllerState.wheelDown)
{
if (KeyPressed(VK_LCONTROL) && m_nMul != 1)
{
--m_nMul;
SetHelpMessage(std::to_string(m_nMul).c_str());
}
else
{ {
if (m_fFOV < 115.0f) if (m_fFOV < 115.0f)
{ {
@ -141,6 +156,7 @@ void Freecam::Process()
TheCamera.LerpFOV(TheCamera.FindCamFOV(), m_fFOV, 250, true); TheCamera.LerpFOV(TheCamera.FindCamFOV(), m_fFOV, 250, true);
Command<Commands::CAMERA_PERSIST_FOV>(true); Command<Commands::CAMERA_PERSIST_FOV>(true);
} }
}
m_pPed->SetHeading(m_fTotalMouse.x); m_pPed->SetHeading(m_fTotalMouse.x);
Command<Commands::ATTACH_CAMERA_TO_CHAR>(m_nPed, 0.0, 0.0, 20.0, 90.0, 180, m_fTotalMouse.y, 0.0, 2); Command<Commands::ATTACH_CAMERA_TO_CHAR>(m_nPed, 0.0, 0.0, 20.0, 90.0, 180, m_fTotalMouse.y, 0.0, 2);
@ -165,8 +181,6 @@ void Freecam::Clear()
} }
void RandomCheats::Process() void RandomCheats::Process()
{
if (m_bEnabled)
{ {
static bool genCheats = false; static bool genCheats = false;
if (!genCheats) if (!genCheats)
@ -186,6 +200,8 @@ void RandomCheats::Process()
genCheats = true; genCheats = true;
} }
if (m_bEnabled)
{
uint timer = CTimer::m_snTimeInMilliseconds; uint timer = CTimer::m_snTimeInMilliseconds;
if ((timer - m_nTimer) > (static_cast<uint>(m_nInterval) * 1000)) if ((timer - m_nTimer) > (static_cast<uint>(m_nInterval) * 1000))
{ {

View File

@ -321,7 +321,7 @@ void Teleport::ShowPage()
} }
ImGui::SameLine(); ImGui::SameLine();
#ifdef GTASA #ifdef GTASA
if (ImGui::Button(TEXT("Teleport.TeleportMarker"), Widget::CalcSize(2))) if (ImGui::Button((TEXT_S("Teleport.TeleportMarker") + "##Btn").c_str(), Widget::CalcSize(2)))
{ {
TeleportPlayer(true); TeleportPlayer(true);
} }