Add nospread, auto unflip, lockCamZoom
This commit is contained in:
parent
4615338c9e
commit
1305f85382
@ -42,6 +42,10 @@ WalkingStyleSet = "Walking style set"
|
|||||||
ActivateTimer = "Activate cheat timer"
|
ActivateTimer = "Activate cheat timer"
|
||||||
ActivateTimerText = "Time for the next cheat activation"
|
ActivateTimerText = "Time for the next cheat activation"
|
||||||
Beach = "Beach"
|
Beach = "Beach"
|
||||||
|
CameraZoom = "Camera zoom"
|
||||||
|
CameraZoomLock = "Lock camera zoom"
|
||||||
|
CameraZoomLockFreecam = "Freecam is enabled. Camera zoom can't work together with freecam mode"
|
||||||
|
CameraZoomLockInfo = "Note: This will permanently lock camera zoom. Snipers or scopes won't work properly!"
|
||||||
Cloudy = "Cloudy"
|
Cloudy = "Cloudy"
|
||||||
Country = "Country"
|
Country = "Country"
|
||||||
CurrentDay = "Current day"
|
CurrentDay = "Current day"
|
||||||
@ -99,6 +103,7 @@ PlayerTeleported = "Player teleported"
|
|||||||
ProgressBar = "Progress bar"
|
ProgressBar = "Progress bar"
|
||||||
Rainy = "Rainy"
|
Rainy = "Rainy"
|
||||||
RandomCheats = "Random cheats"
|
RandomCheats = "Random cheats"
|
||||||
|
ResetDefault = "Reset to default"
|
||||||
Sandstorm = "Sandstorm"
|
Sandstorm = "Sandstorm"
|
||||||
SaveGame = "Save game (might cause game bugs)"
|
SaveGame = "Save game (might cause game bugs)"
|
||||||
Screenshot = "Screenshot shortcut"
|
Screenshot = "Screenshot shortcut"
|
||||||
@ -132,6 +137,7 @@ TranslatorName = "Grinch_"
|
|||||||
[Menu]
|
[Menu]
|
||||||
About = "About"
|
About = "About"
|
||||||
Author = "Author"
|
Author = "Author"
|
||||||
|
AutoCheckUpdate = "Check for updates"
|
||||||
BugDisclaimer = "If you find bugs or have suggestions, let me know on discord."
|
BugDisclaimer = "If you find bugs or have suggestions, let me know on discord."
|
||||||
Build = "Build"
|
Build = "Build"
|
||||||
CheatMenuNoDir = "Failed to find CheatMenu directory!"
|
CheatMenuNoDir = "Failed to find CheatMenu directory!"
|
||||||
@ -220,7 +226,7 @@ Teleports player to specified coordinates.
|
|||||||
Example: tp x y z"""
|
Example: tp x y z"""
|
||||||
TextColor = "Text color"
|
TextColor = "Text color"
|
||||||
TextOnlyMode = "Text only"
|
TextOnlyMode = "Text only"
|
||||||
TextOnlyModeHint = "Disables all images and shows only text"
|
TextOnlyModeHint = "Replace images with their appropriate texts"
|
||||||
TPMarkerKey = "Teleport to marker"
|
TPMarkerKey = "Teleport to marker"
|
||||||
Usage = "Usage"
|
Usage = "Usage"
|
||||||
UpdaterInfo1 = "It's highly recommanded to update to the latest version. Newer version contains new features and bug fixes."
|
UpdaterInfo1 = "It's highly recommanded to update to the latest version. Newer version contains new features and bug fixes."
|
||||||
@ -417,6 +423,7 @@ All = "All"
|
|||||||
AllNitro = "All cars have nitro"
|
AllNitro = "All cars have nitro"
|
||||||
AllTaxiNitro = "All taxis have nitro"
|
AllTaxiNitro = "All taxis have nitro"
|
||||||
AnimGroup = "Anim group"
|
AnimGroup = "Anim group"
|
||||||
|
AutoUnflip = "Auto unflip"
|
||||||
Big = "Big"
|
Big = "Big"
|
||||||
BikeFly = "Bikes fly"
|
BikeFly = "Bikes fly"
|
||||||
Black = "Black"
|
Black = "Black"
|
||||||
@ -743,6 +750,7 @@ InfiniteAmmo = "Infinite ammo"
|
|||||||
LongRange = "Long range"
|
LongRange = "Long range"
|
||||||
MoveWhenAiming = "Move when aiming"
|
MoveWhenAiming = "Move when aiming"
|
||||||
MoveWhenFiring = "Move when firing"
|
MoveWhenFiring = "Move when firing"
|
||||||
|
NoSpread = "No spread"
|
||||||
RapidFire = "Rapid fire"
|
RapidFire = "Rapid fire"
|
||||||
SelectGang = "Select gang"
|
SelectGang = "Select gang"
|
||||||
Weapon1 = "Weapon 1"
|
Weapon1 = "Weapon 1"
|
||||||
|
65
src/game.cpp
65
src/game.cpp
@ -195,7 +195,15 @@ void Freecam::Clear()
|
|||||||
Command<Commands::DELETE_CHAR>(m_nPed);
|
Command<Commands::DELETE_CHAR>(m_nPed);
|
||||||
m_pPed = nullptr;
|
m_pPed = nullptr;
|
||||||
|
|
||||||
Command<Commands::CAMERA_PERSIST_FOV>(false);
|
// restore lock camera zoom here
|
||||||
|
if (Game::m_bLockCameraZoom)
|
||||||
|
{
|
||||||
|
TheCamera.LerpFOV(TheCamera.FindCamFOV(), Game::m_nCameraZoom, 250, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Command<Commands::CAMERA_PERSIST_FOV>(false);
|
||||||
|
}
|
||||||
Command<Commands::RESTORE_CAMERA_JUMPCUT>();
|
Command<Commands::RESTORE_CAMERA_JUMPCUT>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,6 +312,7 @@ static void RealTimeClock()
|
|||||||
void Game::Init()
|
void Game::Init()
|
||||||
{
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
|
||||||
Events::drawMenuBackgroundEvent += []()
|
Events::drawMenuBackgroundEvent += []()
|
||||||
{
|
{
|
||||||
if (bSaveGameFlag)
|
if (bSaveGameFlag)
|
||||||
@ -605,8 +614,55 @@ void Game::ShowPage()
|
|||||||
}
|
}
|
||||||
if (ImGui::BeginTabItem(TEXT("Window.MenusTab")))
|
if (ImGui::BeginTabItem(TEXT("Window.MenusTab")))
|
||||||
{
|
{
|
||||||
|
ImGui::Spacing();
|
||||||
ImGui::BeginChild("##Menus");
|
ImGui::BeginChild("##Menus");
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
if (ImGui::CollapsingHeader(TEXT("Game.CameraZoom")))
|
||||||
|
{
|
||||||
|
ImGui::Spacing();
|
||||||
|
if (Freecam::m_bEnabled)
|
||||||
|
{
|
||||||
|
ImGui::TextWrapped(TEXT("Game.CameraZoomLockFreecam"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Widget::Checkbox(TEXT("Game.CameraZoomLock"), &m_bLockCameraZoom))
|
||||||
|
{
|
||||||
|
if (!m_bLockCameraZoom)
|
||||||
|
{
|
||||||
|
Command<Commands::CAMERA_PERSIST_FOV>(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::Spacing();
|
||||||
|
if (!m_bLockCameraZoom)
|
||||||
|
{
|
||||||
|
ImGui::BeginDisabled();
|
||||||
|
}
|
||||||
|
if (ImGui::SliderInt(TEXT("Game.CameraZoom"), &m_nCameraZoom, 5, 120))
|
||||||
|
{
|
||||||
|
TheCamera.LerpFOV(TheCamera.FindCamFOV(), m_nCameraZoom, 250, true);
|
||||||
|
Command<Commands::CAMERA_PERSIST_FOV>(true);
|
||||||
|
}
|
||||||
|
ImGui::Spacing();
|
||||||
|
if (ImGui::Button(TEXT("Game.ResetDefault"), Widget::CalcSize()))
|
||||||
|
{
|
||||||
|
m_nCameraZoom = 70.0f;
|
||||||
|
TheCamera.LerpFOV(TheCamera.FindCamFOV(), 70.0f, 250, true);
|
||||||
|
Command<Commands::CAMERA_PERSIST_FOV>(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_bLockCameraZoom)
|
||||||
|
{
|
||||||
|
ImGui::TextWrapped(TEXT("Game.CameraZoomLockInfo"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ImGui::EndDisabled();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::Separator();
|
||||||
|
}
|
||||||
if (ImGui::CollapsingHeader(TEXT("Game.CurrentDay")))
|
if (ImGui::CollapsingHeader(TEXT("Game.CurrentDay")))
|
||||||
{
|
{
|
||||||
int day = CClock::CurrentDay - 1;
|
int day = CClock::CurrentDay - 1;
|
||||||
@ -617,7 +673,7 @@ void Game::ShowPage()
|
|||||||
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
}//0xC17040
|
}
|
||||||
#endif
|
#endif
|
||||||
Widget::EditAddr<int>(TEXT("Game.DaysPassed"), BY_GAME(0xB79038, 0x97F1F4, 0x8F2BB8), 0, 9999);
|
Widget::EditAddr<int>(TEXT("Game.DaysPassed"), BY_GAME(0xB79038, 0x97F1F4, 0x8F2BB8), 0, 9999);
|
||||||
Widget::EditAddr<int>(TEXT("Game.FPSLimit"), (uint)&(RsGlobal.maxFPS), 1, 30, 999);
|
Widget::EditAddr<int>(TEXT("Game.FPSLimit"), (uint)&(RsGlobal.maxFPS), 1, 30, 999);
|
||||||
@ -774,7 +830,10 @@ void Game::ShowPage()
|
|||||||
}
|
}
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
||||||
ImGui::SliderFloat(TEXT("Game.FieldOfView"), &Freecam::m_fFOV, 5.0f, 120.0f);
|
if (ImGui::SliderFloat(TEXT("Game.FieldOfView"), &Freecam::m_fFOV, 5.0f, 120.0f) && Freecam::m_bEnabled)
|
||||||
|
{
|
||||||
|
TheCamera.LerpFOV(TheCamera.FindCamFOV(), Freecam::m_fFOV, 250, true);
|
||||||
|
}
|
||||||
ImGui::SliderInt(TEXT("Game.MovementSpeed"), &Freecam::m_nMul, 1, 10);
|
ImGui::SliderInt(TEXT("Game.MovementSpeed"), &Freecam::m_nMul, 1, 10);
|
||||||
ImGui::Dummy(ImVec2(0.0f, 20.0f));
|
ImGui::Dummy(ImVec2(0.0f, 20.0f));
|
||||||
|
|
||||||
|
@ -68,6 +68,11 @@ public:
|
|||||||
static inline bool m_bFreezeTime;
|
static inline bool m_bFreezeTime;
|
||||||
static inline bool m_bSyncTime;
|
static inline bool m_bSyncTime;
|
||||||
|
|
||||||
|
#ifdef GTASA
|
||||||
|
static inline int m_nCameraZoom = 70.0f;
|
||||||
|
static inline bool m_bLockCameraZoom;
|
||||||
|
#endif
|
||||||
|
|
||||||
Game() = delete;
|
Game() = delete;
|
||||||
Game(const Game&) = delete;
|
Game(const Game&) = delete;
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ void Menu::ShowPage()
|
|||||||
ImGui::Dummy(ImVec2(0, 10));
|
ImGui::Dummy(ImVec2(0, 10));
|
||||||
|
|
||||||
fixVeh.DrawUI(TEXT("Menu.FixVehKey"));
|
fixVeh.DrawUI(TEXT("Menu.FixVehKey"));
|
||||||
flipVeh.DrawUI(TEXT("Menu.FlipVehKey"));
|
unflipVeh.DrawUI(TEXT("Menu.FlipVehKey"));
|
||||||
godMode.DrawUI(TEXT("Menu.GodModeKey"));
|
godMode.DrawUI(TEXT("Menu.GodModeKey"));
|
||||||
vehEngine.DrawUI(TEXT("Menu.VehEngineKey"));
|
vehEngine.DrawUI(TEXT("Menu.VehEngineKey"));
|
||||||
vehInstantStart.DrawUI(TEXT("Menu.VehStartKey"));
|
vehInstantStart.DrawUI(TEXT("Menu.VehStartKey"));
|
||||||
|
@ -12,7 +12,7 @@ Hotkey freeCamRight {VK_KEY_D, VK_KEY_D, "Freecam.Right"};
|
|||||||
Hotkey freeCamTeleport {VK_RETURN, VK_RETURN, "Freecam.Teleport"};
|
Hotkey freeCamTeleport {VK_RETURN, VK_RETURN, "Freecam.Teleport"};
|
||||||
Hotkey commandWindow {VK_LCONTROL, VK_KEY_C, "CommandWindowToggle"};;
|
Hotkey commandWindow {VK_LCONTROL, VK_KEY_C, "CommandWindowToggle"};;
|
||||||
Hotkey fixVeh {VK_NONE, VK_NONE, "Vehicle.Fix"};
|
Hotkey fixVeh {VK_NONE, VK_NONE, "Vehicle.Fix"};
|
||||||
Hotkey flipVeh {VK_NONE, VK_NONE, "Vehicle.Flip"};
|
Hotkey unflipVeh {VK_NONE, VK_NONE, "Vehicle.Flip"};
|
||||||
Hotkey godMode {VK_NONE, VK_NONE, "GodMode"};
|
Hotkey godMode {VK_NONE, VK_NONE, "GodMode"};
|
||||||
Hotkey menuOpen {VK_LCONTROL, VK_KEY_M, "MenuToggle"};
|
Hotkey menuOpen {VK_LCONTROL, VK_KEY_M, "MenuToggle"};
|
||||||
Hotkey quickSceenShot {VK_F5, VK_F5, "QuickScreenshot"};
|
Hotkey quickSceenShot {VK_F5, VK_F5, "QuickScreenshot"};
|
||||||
|
@ -107,7 +107,7 @@ extern Hotkey freeCamRight;
|
|||||||
extern Hotkey freeCamTeleport;
|
extern Hotkey freeCamTeleport;
|
||||||
extern Hotkey commandWindow;
|
extern Hotkey commandWindow;
|
||||||
extern Hotkey fixVeh;
|
extern Hotkey fixVeh;
|
||||||
extern Hotkey flipVeh;
|
extern Hotkey unflipVeh;
|
||||||
extern Hotkey godMode;
|
extern Hotkey godMode;
|
||||||
extern Hotkey menuOpen;
|
extern Hotkey menuOpen;
|
||||||
extern Hotkey quickSceenShot;
|
extern Hotkey quickSceenShot;
|
||||||
|
@ -42,7 +42,7 @@ void Util::FixVehicle(CVehicle *pVeh)
|
|||||||
pVeh->m_fHealth = 1000.0f;
|
pVeh->m_fHealth = 1000.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Util::FlipVehicle(CVehicle *pVeh)
|
void Util::UnFlipVehicle(CVehicle *pVeh)
|
||||||
{
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
int hveh = CPools::GetVehicleRef(pVeh);
|
int hveh = CPools::GetVehicleRef(pVeh);
|
||||||
|
@ -24,7 +24,7 @@ public:
|
|||||||
static bool IsOnMission();
|
static bool IsOnMission();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void FlipVehicle(CVehicle *pVeh);
|
static void UnFlipVehicle(CVehicle *pVeh);
|
||||||
static void FixVehicle(CVehicle *pVeh);
|
static void FixVehicle(CVehicle *pVeh);
|
||||||
static CPed* GetClosestPed();
|
static CPed* GetClosestPed();
|
||||||
static CVehicle* GetClosestVehicle();
|
static CVehicle* GetClosestVehicle();
|
||||||
|
@ -37,10 +37,15 @@ void Vehicle::Init()
|
|||||||
if (pPlayer && Util::IsInVehicle())
|
if (pPlayer && Util::IsInVehicle())
|
||||||
{
|
{
|
||||||
int hveh = CPools::GetVehicleRef(pVeh);
|
int hveh = CPools::GetVehicleRef(pVeh);
|
||||||
|
float speed = pVeh->m_vecMoveSpeed.Magnitude() * 50.0f;
|
||||||
if (flipVeh.Pressed())
|
if (m_bAutoUnflip && pVeh->IsUpsideDown() && speed < 2.0f)
|
||||||
{
|
{
|
||||||
Util::FlipVehicle(pVeh);
|
Util::UnFlipVehicle(pVeh);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (unflipVeh.Pressed())
|
||||||
|
{
|
||||||
|
Util::UnFlipVehicle(pVeh);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fixVeh.Pressed())
|
if (fixVeh.Pressed())
|
||||||
@ -525,13 +530,13 @@ void Vehicle::ShowPage()
|
|||||||
|
|
||||||
if (ImGui::Button(TEXT("Vehicle.FlipCar"), ImVec2(Widget::CalcSize(3))) && Util::IsInVehicle())
|
if (ImGui::Button(TEXT("Vehicle.FlipCar"), ImVec2(Widget::CalcSize(3))) && Util::IsInVehicle())
|
||||||
{
|
{
|
||||||
Util::FlipVehicle(pVeh);
|
Util::UnFlipVehicle(pVeh);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
||||||
if (ImGui::BeginTabBar("Vehicle", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
|
if (ImGui::BeginTabBar("Vehicle", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
|
||||||
{
|
{
|
||||||
CVehicle* pVeh = pPlayer->m_pVehicle;
|
CVehicle* pVeh = pPlayer->m_pVehicle;
|
||||||
bool is_driver = pVeh && (pPlayer->m_pVehicle->m_pDriver == pPlayer);
|
bool is_driver = pVeh && (pPlayer->m_pVehicle->m_pDriver == pPlayer);
|
||||||
|
|
||||||
@ -547,6 +552,8 @@ void Vehicle::ShowPage()
|
|||||||
Widget::CheckboxAddr(TEXT("Vehicle.AllNitro"), 0x969165);
|
Widget::CheckboxAddr(TEXT("Vehicle.AllNitro"), 0x969165);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Widget::Checkbox(TEXT("Vehicle.AutoUnflip"), &m_bAutoUnflip);
|
||||||
|
|
||||||
#ifndef GTA3
|
#ifndef GTA3
|
||||||
Widget::CheckboxAddr(TEXT("Vehicle.AggroDriver"), BY_GAME(0x96914F,0xA10B47, NULL));
|
Widget::CheckboxAddr(TEXT("Vehicle.AggroDriver"), BY_GAME(0x96914F,0xA10B47, NULL));
|
||||||
Widget::CheckboxAddr(TEXT("Vehicle.AllTaxiNitro"), BY_GAME(0x96918B,0xA10B3A, NULL));
|
Widget::CheckboxAddr(TEXT("Vehicle.AllTaxiNitro"), BY_GAME(0x96918B,0xA10B3A, NULL));
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
class Vehicle
|
class Vehicle
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
static inline bool m_bAutoUnflip;
|
||||||
static inline bool m_bBikeFly;
|
static inline bool m_bBikeFly;
|
||||||
static inline bool m_bDontFallBike;
|
static inline bool m_bDontFallBike;
|
||||||
static inline bool m_bVehHeavy;
|
static inline bool m_bVehHeavy;
|
||||||
|
@ -78,6 +78,11 @@ void Weapon::Init()
|
|||||||
pWeaponInfo->m_nFlags.bMoveAim = true;
|
pWeaponInfo->m_nFlags.bMoveAim = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_bNoSpread)
|
||||||
|
{
|
||||||
|
pWeaponInfo->m_fAccuracy = 100.0f;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_bMoveFire)
|
if (m_bMoveFire)
|
||||||
{
|
{
|
||||||
pWeaponInfo->m_nFlags.bMoveFire = true;
|
pWeaponInfo->m_nFlags.bMoveFire = true;
|
||||||
@ -326,6 +331,13 @@ void Weapon::ShowPage()
|
|||||||
CWeaponInfo::LoadWeaponData();
|
CWeaponInfo::LoadWeaponData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Widget::Checkbox(TEXT("Weapon.NoSpread"), &m_bNoSpread))
|
||||||
|
{
|
||||||
|
if (!m_bNoSpread)
|
||||||
|
{
|
||||||
|
CWeaponInfo::LoadWeaponData();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (Widget::Checkbox(TEXT("Weapon.RapidFire"), &m_bRapidFire))
|
if (Widget::Checkbox(TEXT("Weapon.RapidFire"), &m_bRapidFire))
|
||||||
{
|
{
|
||||||
if (!m_bRapidFire)
|
if (!m_bRapidFire)
|
||||||
|
@ -16,6 +16,7 @@ private:
|
|||||||
static inline bool m_bDualWeild;
|
static inline bool m_bDualWeild;
|
||||||
static inline bool m_bMoveAim;
|
static inline bool m_bMoveAim;
|
||||||
static inline bool m_bMoveFire;
|
static inline bool m_bMoveFire;
|
||||||
|
static inline bool m_bNoSpread;
|
||||||
static inline int m_nSelectedGang;
|
static inline int m_nSelectedGang;
|
||||||
static inline int m_nGangWeaponList[10][3] =
|
static inline int m_nGangWeaponList[10][3] =
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user