1. Rename 'Auto heal' -> 'Health regen'
2. Block VCMP for VC build 3. Refactor code
This commit is contained in:
parent
b3d4fd10d0
commit
600ef84cef
@ -295,7 +295,7 @@ void Animation::Draw()
|
|||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
if (ImGui::BeginTabItem("Custom"))
|
if (ImGui::BeginTabItem("Custom"))
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
class Animation
|
class Animation
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Animation player
|
// Animation player
|
||||||
static inline ResourceStore m_AnimData{ "animation", eResourceType::TYPE_TEXT };
|
static inline ResourceStore m_AnimData{ "animation", eResourceType::TYPE_TEXT };
|
||||||
static inline char m_nAnimBuffer[INPUT_BUFFER_SIZE];
|
static inline char m_nAnimBuffer[INPUT_BUFFER_SIZE];
|
||||||
@ -13,7 +12,7 @@ private:
|
|||||||
static inline bool m_bSecondary; // play animation as secondary
|
static inline bool m_bSecondary; // play animation as secondary
|
||||||
static inline bool m_PedAnim;
|
static inline bool m_PedAnim;
|
||||||
static inline CPed *m_pTarget = nullptr;
|
static inline CPed *m_pTarget = nullptr;
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
// Cutscene player
|
// Cutscene player
|
||||||
struct m_Cutscene
|
struct m_Cutscene
|
||||||
@ -36,21 +35,18 @@ private:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
|
||||||
Animation();
|
|
||||||
|
|
||||||
public:
|
|
||||||
static void Draw();
|
|
||||||
static void PlayAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
|
static void PlayAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
|
||||||
static void RemoveAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
|
static void RemoveAnimation(std::string& rootKey, std::string& anim, std::string& ifp);
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
static void PlayCutscene(std::string& rootKey, std::string& cutsceneId, std::string& interior);
|
static void PlayCutscene(std::string& rootKey, std::string& cutsceneId, std::string& interior);
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
static bool _LoadAnimationBlock(const char* szBlockName);
|
static bool _LoadAnimationBlock(const char* szBlockName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GTASA
|
#ifndef GTASA
|
||||||
static void _PlayAnimation(RpClump* pClump, int animGroup, int animID, float blend);
|
static void _PlayAnimation(RpClump* pClump, int animGroup, int animID, float blend);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
public:
|
||||||
|
Animation();
|
||||||
|
static void Draw();
|
||||||
};
|
};
|
@ -1,6 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "cheatMenu.h"
|
#include "cheatMenu.h"
|
||||||
#include "menuinfo.h"
|
#include "version.h"
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "updater.h"
|
#include "updater.h"
|
||||||
#include "d3dhook.h"
|
#include "d3dhook.h"
|
||||||
@ -81,7 +81,7 @@ CheatMenu::CheatMenu()
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApplyStyle();
|
ApplyStyle();
|
||||||
|
|
||||||
// Load menu settings
|
// Load menu settings
|
||||||
|
@ -50,9 +50,8 @@ void D3dHook::ProcessFrame(void* ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
static bool bInit = false;
|
static bool init;
|
||||||
|
if (init)
|
||||||
if (bInit)
|
|
||||||
{
|
{
|
||||||
ProcessMouse();
|
ProcessMouse();
|
||||||
|
|
||||||
@ -116,12 +115,11 @@ void D3dHook::ProcessFrame(void* ptr)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bInit = true;
|
init = true;
|
||||||
ImGui_ImplWin32_Init(RsGlobal.ps->window);
|
ImGui_ImplWin32_Init(RsGlobal.ps->window);
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
// shift trigger fix
|
patch::Nop(0x00531155, 5); // shift trigger fix
|
||||||
patch::Nop(0x00531155, 5);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gRenderer == Render_DirectX9)
|
if (gRenderer == Render_DirectX9)
|
||||||
@ -191,7 +189,7 @@ void D3dHook::ProcessMouse()
|
|||||||
bMouseDisabled = true;
|
bMouseDisabled = true;
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
pad->m_bDisablePlayerControls = true;
|
pad->m_bDisablePlayerControls = true;
|
||||||
#else
|
#else
|
||||||
pad->DisablePlayerControls = true;
|
pad->DisablePlayerControls = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -200,7 +198,7 @@ void D3dHook::ProcessMouse()
|
|||||||
bMouseDisabled = false;
|
bMouseDisabled = false;
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
pad->m_bDisablePlayerControls = false;
|
pad->m_bDisablePlayerControls = false;
|
||||||
#else
|
#else
|
||||||
pad->DisablePlayerControls = false;
|
pad->DisablePlayerControls = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -245,8 +243,14 @@ void D3dHook::ProcessMouse()
|
|||||||
|
|
||||||
bool D3dHook::InjectHook(void *pCallback)
|
bool D3dHook::InjectHook(void *pCallback)
|
||||||
{
|
{
|
||||||
|
static bool hookInjected;
|
||||||
|
if (hookInjected)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Must check for d3d9 first!
|
Must check for d3d9 first!
|
||||||
Seems to crash with nvidia geforce experience overlay
|
Seems to crash with nvidia geforce experience overlay
|
||||||
@ -258,8 +262,7 @@ bool D3dHook::InjectHook(void *pCallback)
|
|||||||
kiero::bind(16, (void**)&oReset, hkReset);
|
kiero::bind(16, (void**)&oReset, hkReset);
|
||||||
kiero::bind(42, (void**)&oEndScene, hkEndScene);
|
kiero::bind(42, (void**)&oEndScene, hkEndScene);
|
||||||
pCallbackFunc = pCallback;
|
pCallbackFunc = pCallback;
|
||||||
|
hookInjected = true;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -269,12 +272,11 @@ bool D3dHook::InjectHook(void *pCallback)
|
|||||||
gRenderer = Render_DirectX11;
|
gRenderer = Render_DirectX11;
|
||||||
kiero::bind(8, (void**)&oPresent, hkPresent);
|
kiero::bind(8, (void**)&oPresent, hkPresent);
|
||||||
pCallbackFunc = pCallback;
|
pCallbackFunc = pCallback;
|
||||||
|
hookInjected = true;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return hookInjected;
|
||||||
}
|
}
|
||||||
|
|
||||||
void D3dHook::RemoveHook()
|
void D3dHook::RemoveHook()
|
||||||
|
@ -5,17 +5,17 @@ class D3dHook
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
using f_EndScene = HRESULT(CALLBACK*)(IDirect3DDevice9*);
|
using f_EndScene = HRESULT(CALLBACK*)(IDirect3DDevice9*);
|
||||||
using f_Present11 = HRESULT(CALLBACK*)(IDXGISwapChain*, UINT, UINT);
|
using f_Present = HRESULT(CALLBACK*)(IDXGISwapChain*, UINT, UINT);
|
||||||
using f_Reset = HRESULT(CALLBACK*)(IDirect3DDevice9*, D3DPRESENT_PARAMETERS*);
|
using f_Reset = HRESULT(CALLBACK*)(IDirect3DDevice9*, D3DPRESENT_PARAMETERS*);
|
||||||
|
|
||||||
static inline WNDPROC oWndProc;
|
static inline WNDPROC oWndProc;
|
||||||
static inline f_Present11 oPresent;
|
static inline f_Present oPresent;
|
||||||
static inline f_EndScene oEndScene;
|
static inline f_EndScene oEndScene;
|
||||||
static inline f_Reset oReset;
|
static inline f_Reset oReset;
|
||||||
static inline bool mouseShown;
|
static inline bool mouseShown;
|
||||||
static inline void* pCallbackFunc = nullptr;
|
static inline void* pCallbackFunc = nullptr;
|
||||||
|
|
||||||
|
|
||||||
static void CALLBACK ProcessFrame(void* ptr);
|
static void CALLBACK ProcessFrame(void* ptr);
|
||||||
static LRESULT CALLBACK hkWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
static LRESULT CALLBACK hkWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
static void ProcessMouse();
|
static void ProcessMouse();
|
||||||
@ -28,13 +28,13 @@ private:
|
|||||||
static HRESULT CALLBACK hkPresent(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags);
|
static HRESULT CALLBACK hkPresent(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
D3dHook() = delete;
|
D3dHook() = delete;
|
||||||
D3dHook(D3dHook const&) = delete;
|
D3dHook(D3dHook const&) = delete;
|
||||||
void operator=(D3dHook const&) = delete;
|
void operator=(D3dHook const&) = delete;
|
||||||
|
|
||||||
static bool GetMouseState();
|
static bool GetMouseState();
|
||||||
static bool InjectHook(void *pCallback);
|
static bool InjectHook(void *pCallback);
|
||||||
static void RemoveHook();
|
static void RemoveHook();
|
||||||
static void SetMouseState(bool state);
|
static void SetMouseState(bool state);
|
||||||
};
|
};
|
||||||
|
@ -1,23 +1,12 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "cheatmenu.h"
|
#include "cheatmenu.h"
|
||||||
#include "updater.h"
|
#include "updater.h"
|
||||||
#include "menuinfo.h"
|
#include "version.h"
|
||||||
#include "d3dhook.h"
|
|
||||||
|
|
||||||
void MenuThread(void* param)
|
void MenuThread(void* param)
|
||||||
{
|
{
|
||||||
static bool gameInit;
|
// wait for game init
|
||||||
|
Sleep(3000);
|
||||||
// Wait till game init
|
|
||||||
Events::initRwEvent += []
|
|
||||||
{
|
|
||||||
gameInit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
while (!gameInit)
|
|
||||||
{
|
|
||||||
Sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Had to put this in place since some people put the folder in root
|
Had to put this in place since some people put the folder in root
|
||||||
@ -46,11 +35,11 @@ void MenuThread(void* param)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GTASA
|
|
||||||
/*
|
/*
|
||||||
TODO: Find a better way
|
TODO: Find a better way
|
||||||
Since you could still name it something else
|
Since you could still name it something else
|
||||||
*/
|
*/
|
||||||
|
#ifdef GTASA
|
||||||
if (GetModuleHandle("SAMP.dll") || GetModuleHandle("SAMP.asi"))
|
if (GetModuleHandle("SAMP.dll") || GetModuleHandle("SAMP.asi"))
|
||||||
{
|
{
|
||||||
gLog << "Error: CheatMenu doesn't support SAMP" << std::endl;
|
gLog << "Error: CheatMenu doesn't support SAMP" << std::endl;
|
||||||
@ -58,6 +47,13 @@ void MenuThread(void* param)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CFastman92limitAdjuster::Init();
|
CFastman92limitAdjuster::Init();
|
||||||
|
#elif GTAVC
|
||||||
|
if (GetModuleHandle("vcmp-proxy.dll") || GetModuleHandle("vcmp-proxy.asi"))
|
||||||
|
{
|
||||||
|
gLog << "Error: CheatMenu doesn't support VCMP" << std::endl;
|
||||||
|
MessageBox(RsGlobal.ps->window, "VCMP detected. Exiting CheatMenu.", "CheatMenu", MB_ICONERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gLog << "Starting...\nVersion: " MENU_TITLE "\nAuthor: Grinch_\nDiscord: " DISCORD_INVITE "\nMore Info: "
|
gLog << "Starting...\nVersion: " MENU_TITLE "\nAuthor: Grinch_\nDiscord: " DISCORD_INVITE "\nMore Info: "
|
||||||
@ -69,12 +65,10 @@ void MenuThread(void* param)
|
|||||||
// Checking for updates once a day
|
// Checking for updates once a day
|
||||||
time_t now = time(0);
|
time_t now = time(0);
|
||||||
struct tm tstruct = *localtime(&now);
|
struct tm tstruct = *localtime(&now);
|
||||||
int lastCheckDate = gConfig.GetValue("config.last_update_checked", 0);
|
if (gConfig.GetValue("config.update_date", 0) != tstruct.tm_mday)
|
||||||
|
|
||||||
if (lastCheckDate != tstruct.tm_mday)
|
|
||||||
{
|
{
|
||||||
Updater::CheckUpdate();
|
Updater::CheckUpdate();
|
||||||
gConfig.SetValue("config.last_update_checked", tstruct.tm_mday);
|
gConfig.SetValue("config.update_date", tstruct.tm_mday);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
|
17
src/game.h
17
src/game.h
@ -3,14 +3,12 @@
|
|||||||
|
|
||||||
class Game
|
class Game
|
||||||
{
|
{
|
||||||
public:
|
private:
|
||||||
static inline ResourceStore m_MissionData{ "mission", eResourceType::TYPE_TEXT };
|
static inline ResourceStore m_MissionData{ "mission", eResourceType::TYPE_TEXT };
|
||||||
|
|
||||||
static inline bool m_bDisableCheats;
|
static inline bool m_bDisableCheats;
|
||||||
static inline bool m_bDisableReplay;
|
static inline bool m_bDisableReplay;
|
||||||
static inline bool m_bMissionTimer;
|
static inline bool m_bMissionTimer;
|
||||||
static inline bool m_bFreezeTime;
|
|
||||||
static inline bool m_bSyncTime;
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
static inline bool m_bForbiddenArea = true; // wanted level when going outside playable aea
|
static inline bool m_bForbiddenArea = true; // wanted level when going outside playable aea
|
||||||
static inline bool m_bSolidWater; // walk on water hack
|
static inline bool m_bSolidWater; // walk on water hack
|
||||||
@ -56,13 +54,18 @@ public:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Game();
|
|
||||||
static void Draw();
|
|
||||||
static void RealTimeClock();
|
static void RealTimeClock();
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
// TODO: Update freecam with aap's code
|
// TODO: Update freecam with aap's code
|
||||||
static void FreeCam();
|
static void FreeCam();
|
||||||
static void ClearFreecamStuff();
|
static void ClearFreecamStuff();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
public:
|
||||||
|
static inline bool m_bFreezeTime;
|
||||||
|
static inline bool m_bSyncTime;
|
||||||
|
|
||||||
|
Game();
|
||||||
|
static void Draw();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,20 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "hotkeys.h"
|
#include "hotkeys.h"
|
||||||
|
|
||||||
Hotkey aimSkinChanger;
|
|
||||||
Hotkey freeCam;
|
|
||||||
Hotkey commandWindow;
|
|
||||||
Hotkey fixVeh;
|
|
||||||
Hotkey flipVeh;
|
|
||||||
Hotkey freeCamTeleportPlayer;
|
|
||||||
Hotkey godMode;
|
|
||||||
Hotkey menuOpen;
|
|
||||||
Hotkey quickSceenShot;
|
|
||||||
Hotkey quickTeleport;
|
|
||||||
Hotkey vehEngine;
|
|
||||||
Hotkey vehInstantStart;
|
|
||||||
Hotkey vehInstantStop;
|
|
||||||
|
|
||||||
bool Hotkey::DrawUI(const char* label)
|
bool Hotkey::DrawUI(const char* label)
|
||||||
{
|
{
|
||||||
bool active = (m_CurrentHotkey == label);
|
bool active = (m_CurrentHotkey == label);
|
||||||
|
@ -23,17 +23,3 @@ public:
|
|||||||
bool Pressed();
|
bool Pressed();
|
||||||
std::string GetNameString();
|
std::string GetNameString();
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Hotkey aimSkinChanger;
|
|
||||||
extern Hotkey freeCam;
|
|
||||||
extern Hotkey commandWindow;
|
|
||||||
extern Hotkey fixVeh;
|
|
||||||
extern Hotkey flipVeh;
|
|
||||||
extern Hotkey freeCamTeleportPlayer;
|
|
||||||
extern Hotkey godMode;
|
|
||||||
extern Hotkey menuOpen;
|
|
||||||
extern Hotkey quickSceenShot;
|
|
||||||
extern Hotkey quickTeleport;
|
|
||||||
extern Hotkey vehEngine;
|
|
||||||
extern Hotkey vehInstantStart;
|
|
||||||
extern Hotkey vehInstantStop;
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "menuinfo.h"
|
#include "version.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
16
src/pch.cpp
16
src/pch.cpp
@ -1,2 +1,16 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
CJson gConfig = CJson("config");
|
CJson gConfig = CJson("config");
|
||||||
|
|
||||||
|
Hotkey aimSkinChanger;
|
||||||
|
Hotkey freeCam;
|
||||||
|
Hotkey commandWindow;
|
||||||
|
Hotkey fixVeh;
|
||||||
|
Hotkey flipVeh;
|
||||||
|
Hotkey freeCamTeleportPlayer;
|
||||||
|
Hotkey godMode;
|
||||||
|
Hotkey menuOpen;
|
||||||
|
Hotkey quickSceenShot;
|
||||||
|
Hotkey quickTeleport;
|
||||||
|
Hotkey vehEngine;
|
||||||
|
Hotkey vehInstantStart;
|
||||||
|
Hotkey vehInstantStop;
|
16
src/pch.h
16
src/pch.h
@ -104,4 +104,18 @@ static void SetHelpMessage(const char *message, bool b1, bool b2, bool b3)
|
|||||||
CHud::SetHelpMessage(wc, b1);
|
CHud::SetHelpMessage(wc, b1);
|
||||||
delete wc;
|
delete wc;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern Hotkey aimSkinChanger;
|
||||||
|
extern Hotkey freeCam;
|
||||||
|
extern Hotkey commandWindow;
|
||||||
|
extern Hotkey fixVeh;
|
||||||
|
extern Hotkey flipVeh;
|
||||||
|
extern Hotkey freeCamTeleportPlayer;
|
||||||
|
extern Hotkey godMode;
|
||||||
|
extern Hotkey menuOpen;
|
||||||
|
extern Hotkey quickSceenShot;
|
||||||
|
extern Hotkey quickTeleport;
|
||||||
|
extern Hotkey vehEngine;
|
||||||
|
extern Hotkey vehInstantStart;
|
||||||
|
extern Hotkey vehInstantStop;
|
16
src/ped.h
16
src/ped.h
@ -41,8 +41,15 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
public:
|
|
||||||
|
|
||||||
|
#ifdef GTASA
|
||||||
|
static void SpawnPed(std::string& model);
|
||||||
|
static void BigHeadEffect(CPed *ped);
|
||||||
|
#else
|
||||||
|
static void SpawnPed(std::string& cat, std::string& name, std::string& model);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public:
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
static inline CJson m_SpecialPedJson = CJson("ped special");
|
static inline CJson m_SpecialPedJson = CJson("ped special");
|
||||||
static inline ResourceStore m_PedData{"ped", eResourceType::TYPE_BOTH, ImVec2(65, 110)};
|
static inline ResourceStore m_PedData{"ped", eResourceType::TYPE_BOTH, ImVec2(65, 110)};
|
||||||
@ -53,11 +60,4 @@ public:
|
|||||||
Ped();
|
Ped();
|
||||||
~Ped();
|
~Ped();
|
||||||
static void Draw();
|
static void Draw();
|
||||||
|
|
||||||
#ifdef GTASA
|
|
||||||
static void SpawnPed(std::string& model);
|
|
||||||
static void BigHeadEffect(CPed *ped);
|
|
||||||
#else
|
|
||||||
static void SpawnPed(std::string& cat, std::string& name, std::string& model);
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
@ -7,29 +7,6 @@
|
|||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
#include "ped.h"
|
#include "ped.h"
|
||||||
|
|
||||||
// hardcoded cloth category names
|
|
||||||
const char* cloth_category[18] =
|
|
||||||
{
|
|
||||||
"Shirts",
|
|
||||||
"Heads",
|
|
||||||
"Trousers",
|
|
||||||
"Shoes",
|
|
||||||
"Tattoos left lower arm",
|
|
||||||
"Tattoos left upper arm",
|
|
||||||
"Tattoos right upper arm",
|
|
||||||
"Tattoos right lower arm",
|
|
||||||
"Tattoos back",
|
|
||||||
"Tattoos left chest",
|
|
||||||
"Tattoos right chest",
|
|
||||||
"Tattoos stomach",
|
|
||||||
"Tattoos lower back",
|
|
||||||
"Necklaces",
|
|
||||||
"Watches",
|
|
||||||
"Glasses",
|
|
||||||
"Hats",
|
|
||||||
"Extras"
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline void PlayerModelBrokenFix()
|
static inline void PlayerModelBrokenFix()
|
||||||
{
|
{
|
||||||
CPlayerPed* pPlayer = FindPlayerPed();
|
CPlayerPed* pPlayer = FindPlayerPed();
|
||||||
@ -147,7 +124,7 @@ Player::Player()
|
|||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
int hplayer = CPools::GetPedRef(player);
|
int hplayer = CPools::GetPedRef(player);
|
||||||
|
|
||||||
if (m_bAutoHeal)
|
if (m_bHealthRegen)
|
||||||
{
|
{
|
||||||
static uint lastDmgTimer = 0;
|
static uint lastDmgTimer = 0;
|
||||||
static uint lastHealTimer = 0;
|
static uint lastHealTimer = 0;
|
||||||
@ -417,7 +394,6 @@ void Player::Draw()
|
|||||||
ImGui::BeginChild("CheckboxesChild");
|
ImGui::BeginChild("CheckboxesChild");
|
||||||
|
|
||||||
ImGui::Columns(2, 0, false);
|
ImGui::Columns(2, 0, false);
|
||||||
Ui::CheckboxWithHint("Auto heal", &m_bAutoHeal, "Player will heal when not taken damage for 5 seconds");
|
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
Ui::CheckboxAddress("Bounty on yourself", 0x96913F);
|
Ui::CheckboxAddress("Bounty on yourself", 0x96913F);
|
||||||
@ -469,6 +445,7 @@ void Player::Draw()
|
|||||||
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");
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
Ui::CheckboxAddress("Higher cycle jumps", 0x969161);
|
Ui::CheckboxAddress("Higher cycle jumps", 0x969161);
|
||||||
Ui::CheckboxAddress("Infinite oxygen", 0x96916E);
|
Ui::CheckboxAddress("Infinite oxygen", 0x96916E);
|
||||||
@ -759,7 +736,7 @@ void Player::Draw()
|
|||||||
getline(ss, temp, '$');
|
getline(ss, temp, '$');
|
||||||
|
|
||||||
return temp;
|
return temp;
|
||||||
}, nullptr, cloth_category, sizeof(cloth_category) / sizeof(const char*));
|
}, nullptr, clothNameList, sizeof(clothNameList) / sizeof(const char*));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -792,7 +769,7 @@ void Player::Draw()
|
|||||||
CClothes::RebuildPlayer(player, false);
|
CClothes::RebuildPlayer(player, false);
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
for (const char* clothName : cloth_category)
|
for (const char* clothName : clothNameList)
|
||||||
{
|
{
|
||||||
if (ImGui::Button(clothName, ImVec2(Ui::GetSize(2))))
|
if (ImGui::Button(clothName, ImVec2(Ui::GetSize(2))))
|
||||||
{
|
{
|
||||||
|
18
src/player.h
18
src/player.h
@ -4,7 +4,7 @@
|
|||||||
class Player
|
class Player
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static inline bool m_bAutoHeal;
|
static inline bool m_bHealthRegen;
|
||||||
static inline bool m_bGodMode;
|
static inline bool m_bGodMode;
|
||||||
static inline bool m_bModloaderInstalled;
|
static inline bool m_bModloaderInstalled;
|
||||||
struct m_KeepPosition
|
struct m_KeepPosition
|
||||||
@ -31,14 +31,18 @@ private:
|
|||||||
static inline bool m_bEnabled = false;
|
static inline bool m_bEnabled = false;
|
||||||
static inline float m_fOffset = 40.0f;
|
static inline float m_fOffset = 40.0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline const char* clothNameList[18] =
|
||||||
|
{
|
||||||
|
"Shirts", "Heads", "Trousers", "Shoes", "Tattoos left lower arm", "Tattoos left upper arm",
|
||||||
|
"Tattoos right upper arm", "Tattoos right lower arm", "Tattoos back", "Tattoos left chest",
|
||||||
|
"Tattoos right chest", "Tattoos stomach", "Tattoos lower back", "Necklaces", "Watches",
|
||||||
|
"Glasses", "Hats", "Extras"
|
||||||
|
};
|
||||||
#else
|
#else
|
||||||
static inline ResourceStore skinData { BY_GAME(NULL, "skin", "ped"), eResourceType::TYPE_TEXT };
|
static inline ResourceStore skinData { BY_GAME(NULL, "skin", "ped"), eResourceType::TYPE_TEXT };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
|
||||||
Player();
|
|
||||||
static void Draw();
|
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
static void ChangePlayerModel(std::string& model);
|
static void ChangePlayerModel(std::string& model);
|
||||||
static void ChangePlayerCloth(std::string& model);
|
static void ChangePlayerCloth(std::string& model);
|
||||||
@ -46,4 +50,8 @@ public:
|
|||||||
#else
|
#else
|
||||||
static void ChangePlayerModel(std::string& cat, std::string& name, std::string& id);
|
static void ChangePlayerModel(std::string& cat, std::string& name, std::string& id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
public:
|
||||||
|
Player();
|
||||||
|
static void Draw();
|
||||||
};
|
};
|
||||||
|
@ -32,11 +32,12 @@ private:
|
|||||||
static void FetchRadarSpriteData();
|
static void FetchRadarSpriteData();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
|
||||||
Teleport();
|
|
||||||
public:
|
|
||||||
static void Draw();
|
|
||||||
static void TeleportPlayer(bool get_marker = false, CVector pos = CVector(0, 0, 0), int interior_id = 0);
|
|
||||||
static void TeleportToLocation(std::string& rootkey, std::string& bLocName, std::string& loc);
|
static void TeleportToLocation(std::string& rootkey, std::string& bLocName, std::string& loc);
|
||||||
static void RemoveTeleportEntry(std::string& rootkey, std::string& key, std::string& val);
|
static void RemoveTeleportEntry(std::string& rootkey, std::string& key, std::string& val);
|
||||||
|
|
||||||
|
public:
|
||||||
|
Teleport();
|
||||||
|
|
||||||
|
static void TeleportPlayer(bool get_marker = false, CVector pos = CVector(0, 0, 0), int interior_id = 0);
|
||||||
|
static void Draw();
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "../depend/imgui/imgui_internal.h"
|
#include "../depend/imgui/imgui_internal.h"
|
||||||
#include "menuinfo.h"
|
#include "version.h"
|
||||||
|
|
||||||
// Really messy code, cleanup someday
|
// Really messy code, cleanup someday
|
||||||
bool Ui::DrawTitleBar()
|
bool Ui::DrawTitleBar()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "updater.h"
|
#include "updater.h"
|
||||||
#include "menuinfo.h"
|
#include "version.h"
|
||||||
|
|
||||||
bool Updater::IsUpdateAvailable()
|
bool Updater::IsUpdateAvailable()
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ void Util::SetCarForwardSpeed(CVehicle *pVeh, float speed)
|
|||||||
pVeh->m_vecMoveSpeed.x = speedFactor * inVec.x;
|
pVeh->m_vecMoveSpeed.x = speedFactor * inVec.x;
|
||||||
pVeh->m_vecMoveSpeed.y = speedFactor * inVec.y;
|
pVeh->m_vecMoveSpeed.y = speedFactor * inVec.y;
|
||||||
pVeh->m_vecMoveSpeed.z = speedFactor * inVec.z;
|
pVeh->m_vecMoveSpeed.z = speedFactor * inVec.z;
|
||||||
#else
|
#else
|
||||||
Command<Commands::SET_CAR_FORWARD_SPEED>(CPools::GetVehicleRef(pVeh), 0);
|
Command<Commands::SET_CAR_FORWARD_SPEED>(CPools::GetVehicleRef(pVeh), 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,8 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Vehicle();
|
||||||
|
~Vehicle();
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
static void SpawnVehicle(std::string& name);
|
static void SpawnVehicle(std::string& name);
|
||||||
#else
|
#else
|
||||||
@ -99,6 +101,4 @@ public:
|
|||||||
static std::string GetNameFromModel(int model);
|
static std::string GetNameFromModel(int model);
|
||||||
static int GetModelFromName(const char* name);
|
static int GetModelFromName(const char* name);
|
||||||
static void Draw();
|
static void Draw();
|
||||||
Vehicle();
|
|
||||||
~Vehicle();
|
|
||||||
};
|
};
|
||||||
|
@ -38,6 +38,7 @@ private:
|
|||||||
static bool TimeCycColorEdit4(const char* label, T* r, T* g, T* b, T* a, ImGuiColorEditFlags flags = 0);
|
static bool TimeCycColorEdit4(const char* label, T* r, T* g, T* b, T* a, ImGuiColorEditFlags flags = 0);
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static void TimecycSlider(const char* label, T* data, int min, int max);
|
static void TimecycSlider(const char* label, T* data, int min, int max);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Visual();
|
Visual();
|
||||||
static void Draw();
|
static void Draw();
|
||||||
|
16
src/weapon.h
16
src/weapon.h
@ -3,10 +3,8 @@
|
|||||||
|
|
||||||
class Weapon
|
class Weapon
|
||||||
{
|
{
|
||||||
public:
|
private:
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
static inline ResourceStore m_WeaponData { "weapon", eResourceType::TYPE_BOTH, ImVec2(65, 65) };
|
|
||||||
|
|
||||||
static inline bool m_bAutoAim;
|
static inline bool m_bAutoAim;
|
||||||
static inline bool m_bRapidFire;
|
static inline bool m_bRapidFire;
|
||||||
static inline bool m_bDualWeild;
|
static inline bool m_bDualWeild;
|
||||||
@ -33,7 +31,6 @@ public:
|
|||||||
"Da nang boys", "Mafia", "Mountain cloud triad", "Varrio los aztecas", "Gang9", "Gang10"
|
"Da nang boys", "Mafia", "Mountain cloud triad", "Varrio los aztecas", "Gang9", "Gang10"
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
static inline ResourceStore m_WeaponData { "weapon", eResourceType::TYPE_TEXT };
|
|
||||||
static inline bool m_bInfiniteAmmo;
|
static inline bool m_bInfiniteAmmo;
|
||||||
#endif
|
#endif
|
||||||
static inline bool m_bFastReload;
|
static inline bool m_bFastReload;
|
||||||
@ -43,13 +40,18 @@ public:
|
|||||||
static inline uchar m_nCurrentWeaponSlot = -1;
|
static inline uchar m_nCurrentWeaponSlot = -1;
|
||||||
static inline int m_nSelectedWeapon;
|
static inline int m_nSelectedWeapon;
|
||||||
|
|
||||||
Weapon();
|
public:
|
||||||
static void Draw();
|
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
static inline ResourceStore m_WeaponData { "weapon", eResourceType::TYPE_BOTH, ImVec2(65, 65) };
|
||||||
|
|
||||||
static void GiveWeaponToPlayer(std::string& weapon_type);
|
static void GiveWeaponToPlayer(std::string& weapon_type);
|
||||||
static void SetGangWeapon(std::string& weapon_type);
|
static void SetGangWeapon(std::string& weapon_type);
|
||||||
#else
|
#else
|
||||||
|
static inline ResourceStore m_WeaponData { "weapon", eResourceType::TYPE_TEXT };
|
||||||
|
|
||||||
static void GiveWeaponToPlayer(std::string& rootkey, std::string& model, std::string& name);
|
static void GiveWeaponToPlayer(std::string& rootkey, std::string& model, std::string& name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Weapon();
|
||||||
|
static void Draw();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user