Add freecam hotkeys
This commit is contained in:
parent
be87cd4162
commit
219738d556
@ -128,6 +128,10 @@
|
||||
"FlipVehKey": "Flip current vehicle",
|
||||
"Frames": "Frames: %d",
|
||||
"FreecamKey": "Toggle freecam",
|
||||
"FreecamBackwardKey": "Freecam backward",
|
||||
"FreecamForwardKey": "Freecam forward",
|
||||
"FreecamLeftKey": "Freecam left",
|
||||
"FreecamRightKey": "Freecam right",
|
||||
"GitHubRepo": "GitHub repo",
|
||||
"GodModeKey": "Toggle god mode",
|
||||
"Hotkeys": "Hotkeys",
|
||||
|
@ -321,9 +321,9 @@ void Game::FreeCam()
|
||||
speed *= 2;
|
||||
}
|
||||
|
||||
if (KeyPressed(VK_KEY_I) || KeyPressed(VK_KEY_K))
|
||||
if (freeCamForward.Pressed() || freeCamBackward.Pressed())
|
||||
{
|
||||
if (KeyPressed(VK_KEY_K))
|
||||
if (freeCamForward.Pressed())
|
||||
{
|
||||
speed *= -1;
|
||||
}
|
||||
@ -335,9 +335,9 @@ void Game::FreeCam()
|
||||
pos.z += speed * 2 * sin(m_Freecam::m_fTotalMouse.y / 3 * 3.14159f / 180.0f);
|
||||
}
|
||||
|
||||
if (KeyPressed(VK_KEY_J) || KeyPressed(VK_KEY_L))
|
||||
if (freeCamLeft.Pressed() || freeCamRight.Pressed())
|
||||
{
|
||||
if (KeyPressed(VK_KEY_J))
|
||||
if (freeCamLeft.Pressed())
|
||||
{
|
||||
speed *= -1;
|
||||
}
|
||||
|
32
src/menu.cpp
32
src/menu.cpp
@ -41,6 +41,18 @@ void Menu::Init()
|
||||
freeCam.m_key1 = gConfig.GetValue("hotkey.freecam.key1", VK_F6);
|
||||
freeCam.m_key2 = gConfig.GetValue("hotkey.freecam.key2", VK_F6);
|
||||
|
||||
freeCamForward.m_key1 = gConfig.GetValue("hotkey.freeCamForward.key1", VK_KEY_I);
|
||||
freeCamForward.m_key2 = gConfig.GetValue("hotkey.freeCamForward.key2", VK_KEY_I);
|
||||
|
||||
freeCamBackward.m_key1 = gConfig.GetValue("hotkey.freeCamBackward.key1", VK_KEY_K);
|
||||
freeCamBackward.m_key2 = gConfig.GetValue("hotkey.freeCamBackward.key2", VK_KEY_K);
|
||||
|
||||
freeCamLeft.m_key1 = gConfig.GetValue("hotkey.freeCamLeft.key1", VK_KEY_J);
|
||||
freeCamLeft.m_key2 = gConfig.GetValue("hotkey.freeCamLeft.key2", VK_KEY_J);
|
||||
|
||||
freeCamRight.m_key1 = gConfig.GetValue("hotkey.freeCamRight.key1", VK_KEY_L);
|
||||
freeCamRight.m_key2 = gConfig.GetValue("hotkey.freeCamRight.key2", VK_KEY_L);
|
||||
|
||||
quickSceenShot.m_key1 = gConfig.GetValue("hotkey.quick_screenshot.key1", VK_F5);
|
||||
quickSceenShot.m_key2 = gConfig.GetValue("hotkey.quick_screenshot.key2", VK_F5);
|
||||
|
||||
@ -515,6 +527,26 @@ void Menu::ShowPage()
|
||||
gConfig.SetValue("hotkey.freecam.key1", freeCam.m_key1);
|
||||
gConfig.SetValue("hotkey.freecam.key2", freeCam.m_key2);
|
||||
}
|
||||
if (freeCamForward.DrawUI(TEXT("Menu.FreecamForwardKey")))
|
||||
{
|
||||
gConfig.SetValue("hotkey.freeCamForward.key1", freeCamForward.m_key1);
|
||||
gConfig.SetValue("hotkey.freeCamForward.key2", freeCamForward.m_key2);
|
||||
}
|
||||
if (freeCamBackward.DrawUI(TEXT("Menu.FreecamBackwardKey")))
|
||||
{
|
||||
gConfig.SetValue("hotkey.freeCamBackward.key1", freeCamBackward.m_key1);
|
||||
gConfig.SetValue("hotkey.freeCamBackward.key2", freeCamBackward.m_key2);
|
||||
}
|
||||
if (freeCamLeft.DrawUI(TEXT("Menu.FreecamLeftKey")))
|
||||
{
|
||||
gConfig.SetValue("hotkey.freeCamLeft.key1", freeCamLeft.m_key1);
|
||||
gConfig.SetValue("hotkey.freeCamLeft.key2", freeCamLeft.m_key2);
|
||||
}
|
||||
if (freeCamRight.DrawUI(TEXT("Menu.FreecamRightKey")))
|
||||
{
|
||||
gConfig.SetValue("hotkey.freeCamRight.key1", freeCamRight.m_key1);
|
||||
gConfig.SetValue("hotkey.freeCamRight.key2", freeCamRight.m_key2);
|
||||
}
|
||||
if (quickTeleport.DrawUI(TEXT("Menu.QuickTPKey")))
|
||||
{
|
||||
gConfig.SetValue("hotkey.quick_tp.key1", quickTeleport.m_key1);
|
||||
|
@ -5,6 +5,10 @@ CJson gConfig = CJson("config");
|
||||
|
||||
Hotkey aimSkinChanger;
|
||||
Hotkey freeCam;
|
||||
Hotkey freeCamForward;
|
||||
Hotkey freeCamBackward;
|
||||
Hotkey freeCamLeft;
|
||||
Hotkey freeCamRight;
|
||||
Hotkey commandWindow;
|
||||
Hotkey fixVeh;
|
||||
Hotkey flipVeh;
|
||||
|
@ -110,6 +110,10 @@ static void SetHelpMessage(const char *message, bool b1 = false, bool b2 = false
|
||||
|
||||
extern Hotkey aimSkinChanger;
|
||||
extern Hotkey freeCam;
|
||||
extern Hotkey freeCamForward;
|
||||
extern Hotkey freeCamBackward;
|
||||
extern Hotkey freeCamLeft;
|
||||
extern Hotkey freeCamRight;
|
||||
extern Hotkey commandWindow;
|
||||
extern Hotkey fixVeh;
|
||||
extern Hotkey flipVeh;
|
||||
|
@ -2,5 +2,5 @@
|
||||
#define MENU_NAME "Cheat Menu"
|
||||
#define MENU_VERSION_NUMBER "3.3"
|
||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
||||
#define BUILD_NUMBER "20220523"
|
||||
#define BUILD_NUMBER "20220606"
|
||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION
|
||||
|
@ -2,9 +2,9 @@ rem Generate visual studio files and run the devcmd init
|
||||
@echo off
|
||||
|
||||
rem Set game paths below
|
||||
set "SA_DIR="F:\GTASanAndreas""
|
||||
set "VC_DIR="E:\GTA Vice City""
|
||||
set "III_DIR="E:\GTA3""
|
||||
set "SA_DIR="E:\GTASanAndreas""
|
||||
set "VC_DIR="F:\GTA Vice City""
|
||||
set "III_DIR="F:\GTA3""
|
||||
|
||||
cd tools
|
||||
premake5.exe vs2022
|
||||
|
@ -7,10 +7,10 @@
|
||||
----------------------------
|
||||
-- Should get picked up automatically if you installed them properly
|
||||
PSDK_DIR = os.getenv("PLUGIN_SDK_DIR")
|
||||
DX9SDK_DIR = os.getenv("DIRECTX9_SDK_DIR")
|
||||
DX9SDK_DIR = os.getenv("DXSDK_DIR")
|
||||
|
||||
if (DX9SDK_DIR == nil) then
|
||||
error("DIRECTX9_SDK_DIR environment variable not set")
|
||||
error("DXSDK_DIR environment variable not set")
|
||||
end
|
||||
|
||||
if (PSDK_DIR == nil) then
|
||||
|
Loading…
Reference in New Issue
Block a user