Refactored code
This commit is contained in:
parent
28d7a752a8
commit
a2b7561933
@ -27,8 +27,6 @@ set(src_files
|
|||||||
"src/Animation.h"
|
"src/Animation.h"
|
||||||
"src/CheatMenu.cpp"
|
"src/CheatMenu.cpp"
|
||||||
"src/CheatMenu.h"
|
"src/CheatMenu.h"
|
||||||
"src/Events.cpp"
|
|
||||||
"src/Events.h"
|
|
||||||
"src/Game.cpp"
|
"src/Game.cpp"
|
||||||
"src/Game.h"
|
"src/Game.h"
|
||||||
"src/Hook.cpp"
|
"src/Hook.cpp"
|
||||||
@ -38,6 +36,8 @@ set(src_files
|
|||||||
"src/Menu.cpp"
|
"src/Menu.cpp"
|
||||||
"src/Menu.h"
|
"src/Menu.h"
|
||||||
"src/MenuInfo.h"
|
"src/MenuInfo.h"
|
||||||
|
"src/MoreEvents.cpp"
|
||||||
|
"src/MoreEvents.h"
|
||||||
"src/Neon.cpp"
|
"src/Neon.cpp"
|
||||||
"src/Neon.h"
|
"src/Neon.h"
|
||||||
"src/Paint.cpp"
|
"src/Paint.cpp"
|
||||||
|
@ -3,26 +3,6 @@
|
|||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
bool Animation::loop = false;
|
|
||||||
bool Animation::secondary = false;
|
|
||||||
char Animation::ifp_buffer[INPUT_BUFFER_SIZE] = "";
|
|
||||||
char Animation::anim_buffer[INPUT_BUFFER_SIZE] = "";
|
|
||||||
|
|
||||||
ImGuiTextFilter Animation::filter = "";
|
|
||||||
std::vector<std::string> Animation::search_categories;
|
|
||||||
std::string Animation::selected_item = "All";
|
|
||||||
|
|
||||||
CJson Animation::json = CJson("animation");
|
|
||||||
|
|
||||||
std::vector<std::string> fighting_vec{ "Default","Boxing","Kung fu","Kick Boxing","Punch Kick" };
|
|
||||||
int fighting_selected = 0;
|
|
||||||
|
|
||||||
std::vector<std::string> walking_vec{ "default", "man", "shuffle", "oldman", "gang1", "gang2",
|
|
||||||
"oldfatman", "fatman", "jogger", "drunkman", "blindman", "swat", "woman", "shopping", "busywoman",
|
|
||||||
"sexywoman", "pro", "oldwoman", "fatwoman", "jogwoman", "oldfatwoman", "skate" };
|
|
||||||
|
|
||||||
std::string walking_selected = "default";
|
|
||||||
|
|
||||||
Animation::Animation()
|
Animation::Animation()
|
||||||
{
|
{
|
||||||
json.LoadData(search_categories, selected_item);
|
json.LoadData(search_categories, selected_item);
|
||||||
|
@ -2,16 +2,23 @@
|
|||||||
class Animation
|
class Animation
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static bool loop;
|
inline static bool loop = false;
|
||||||
static bool secondary;
|
inline static bool secondary = false;
|
||||||
|
|
||||||
static CJson json;
|
inline static CJson json = CJson("animation");
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
|
|
||||||
static char anim_buffer[INPUT_BUFFER_SIZE];
|
inline static char anim_buffer[INPUT_BUFFER_SIZE] = "";
|
||||||
static char ifp_buffer[INPUT_BUFFER_SIZE];
|
inline static char ifp_buffer[INPUT_BUFFER_SIZE] = "";
|
||||||
|
|
||||||
|
inline static std::vector<std::string> fighting_vec{ "Default","Boxing","Kung fu","Kick Boxing","Punch Kick" };
|
||||||
|
inline static int fighting_selected = 0;
|
||||||
|
inline static std::vector<std::string> walking_vec{ "default", "man", "shuffle", "oldman", "gang1", "gang2",
|
||||||
|
"oldfatman", "fatman", "jogger", "drunkman", "blindman", "swat", "woman", "shopping", "busywoman",
|
||||||
|
"sexywoman", "pro", "oldwoman", "fatwoman", "jogwoman", "oldfatwoman", "skate" };
|
||||||
|
inline static std::string walking_selected = "default";
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Animation();
|
Animation();
|
||||||
|
@ -3,12 +3,6 @@
|
|||||||
#include "MenuInfo.h"
|
#include "MenuInfo.h"
|
||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
|
|
||||||
CallbackTable CheatMenu::header{
|
|
||||||
{ "Teleport", &Teleport::Draw },{ "Player", &Player::Draw },{ "Ped", &Ped::Draw },
|
|
||||||
{ "Animation", &Animation::Draw },{ "Vehicle", &Vehicle::Draw },{ "Weapon", &Weapon::Draw },
|
|
||||||
{ "Game", &Game::Draw },{ "Visual", &Visual::Draw },{ "Menu", &Menu::Draw }
|
|
||||||
};
|
|
||||||
|
|
||||||
void CheatMenu::DrawWindow()
|
void CheatMenu::DrawWindow()
|
||||||
{
|
{
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
@ -21,7 +21,12 @@
|
|||||||
class CheatMenu : Hook, Animation, Game, Menu, Ped, Player, Teleport, Vehicle, Visual, Weapon
|
class CheatMenu : Hook, Animation, Game, Menu, Ped, Player, Teleport, Vehicle, Visual, Weapon
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static CallbackTable header;
|
inline static CallbackTable header
|
||||||
|
{
|
||||||
|
{ "Teleport", &Teleport::Draw },{ "Player", &Player::Draw },{ "Ped", &Ped::Draw },
|
||||||
|
{ "Animation", &Animation::Draw },{ "Vehicle", &Vehicle::Draw },{ "Weapon", &Weapon::Draw },
|
||||||
|
{ "Game", &Game::Draw },{ "Visual", &Visual::Draw },{ "Menu", &Menu::Draw }
|
||||||
|
};
|
||||||
|
|
||||||
static void ApplyStyle();
|
static void ApplyStyle();
|
||||||
static void DrawWindow();
|
static void DrawWindow();
|
||||||
|
55
src/Game.cpp
55
src/Game.cpp
@ -5,61 +5,8 @@
|
|||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
#include "CIplStore.h"
|
#include "CIplStore.h"
|
||||||
|
|
||||||
ImGuiTextFilter Game::filter = "";
|
|
||||||
std::vector<std::string> Game::search_categories;
|
|
||||||
std::string Game::selected_item = "All";
|
|
||||||
std::vector<std::string> Game::day_names{ "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" };
|
|
||||||
char Game::save_game_name[22] = "";
|
|
||||||
|
|
||||||
CJson Game::json = CJson("mission");
|
|
||||||
|
|
||||||
CJson Game::stat::json = CJson("stat");
|
|
||||||
std::vector<std::string> Game::stat::search_categories;
|
|
||||||
std::string Game::stat::selected_item = "All";
|
|
||||||
ImGuiTextFilter Game::stat::filter = "";
|
|
||||||
|
|
||||||
bool Game::random_cheats::enable = false;
|
|
||||||
int Game::random_cheats::enable_wait_time = 10;
|
|
||||||
uint Game::random_cheats::timer = 0;
|
|
||||||
std::string Game::random_cheats::enabled_cheats[92][2];
|
|
||||||
|
|
||||||
bool Game::freecam::init_done = false;
|
|
||||||
bool Game::freecam::enable = false;
|
|
||||||
float Game::freecam::speed = 0.08f;
|
|
||||||
float Game::freecam::tmouseX = 0;
|
|
||||||
float Game::freecam::tmouseY = 0;
|
|
||||||
float Game::freecam::mouseX = 0;
|
|
||||||
float Game::freecam::mouseY = 0;
|
|
||||||
int Game::freecam::hped = -1;
|
|
||||||
float Game::freecam::fov = -1;
|
|
||||||
CPed* Game::freecam::ped = nullptr;
|
|
||||||
|
|
||||||
bool Game::hard_mode::state = false;
|
|
||||||
float Game::hard_mode::prev_armour = 0.0f;
|
|
||||||
float Game::hard_mode::prev_health = 0.0f;
|
|
||||||
float Game::hard_mode::prev_max_health = 0.0f;
|
|
||||||
float Game::hard_mode::prev_stamina = 0.0f;
|
|
||||||
|
|
||||||
bool Game::disable_cheats = false;
|
|
||||||
bool Game::disable_replay = false;
|
|
||||||
bool Game::forbidden_area_wl = true;
|
|
||||||
bool Game::freeze_mission_timer = false;
|
|
||||||
bool Game::freeze_time = false;
|
|
||||||
bool Game::keep_stuff = false;
|
|
||||||
bool Game::solid_water = false;
|
|
||||||
bool Game::ss_shortcut = false;
|
|
||||||
bool Game::sync_time = false;
|
|
||||||
|
|
||||||
uint Game::sync_time_timer = 0;
|
|
||||||
|
|
||||||
uint Game::solid_water_object = 0;
|
|
||||||
|
|
||||||
CJson Game::random_cheats::name_json = CJson("cheat name");
|
|
||||||
|
|
||||||
static bool mission_warning_shown = false;
|
|
||||||
|
|
||||||
// Thanks to aap
|
// Thanks to aap
|
||||||
void RealTimeClock(void)
|
void Game::RealTimeClock()
|
||||||
{
|
{
|
||||||
static int lastday;
|
static int lastday;
|
||||||
time_t tmp = time(NULL);
|
time_t tmp = time(NULL);
|
||||||
|
81
src/Game.h
81
src/Game.h
@ -2,66 +2,71 @@
|
|||||||
class Game
|
class Game
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static CJson json;
|
inline static CJson json = CJson("mission");
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
static std::vector<std::string> day_names;
|
inline static std::vector<std::string> day_names = { "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" };
|
||||||
|
|
||||||
static char save_game_name[22];
|
inline static char save_game_name[22] = "";
|
||||||
|
|
||||||
struct random_cheats
|
struct random_cheats
|
||||||
{
|
{
|
||||||
static bool enable;
|
inline static bool enable = false;
|
||||||
static int enable_wait_time;
|
inline static int enable_wait_time = 10;
|
||||||
static CJson name_json;
|
inline static CJson name_json = CJson("cheat name");
|
||||||
static uint timer;
|
inline static uint timer = 0;
|
||||||
static std::string enabled_cheats[92][2];
|
inline static std::string enabled_cheats[92][2];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct freecam
|
struct freecam
|
||||||
{
|
{
|
||||||
static bool enable;
|
inline static bool enable = false;
|
||||||
static float speed;
|
inline static float speed = 0.08f;
|
||||||
static float fov;
|
inline static float fov = -1;
|
||||||
static bool init_done;
|
inline static bool init_done = false;
|
||||||
static CPed* ped;
|
inline static CPed* ped = nullptr;
|
||||||
static int hped;
|
inline static int hped = -1;
|
||||||
static float mouseX, mouseY, tmouseX, tmouseY;
|
inline static float mouseX = 0.0f;
|
||||||
|
inline static float mouseY = 0.0f;
|
||||||
|
inline static float tmouseX = 0.0f;
|
||||||
|
inline static float tmouseY = 0.0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hard_mode
|
struct hard_mode
|
||||||
{
|
{
|
||||||
static bool state;
|
inline static bool state = false;
|
||||||
static float prev_health;
|
inline static float prev_health = 0.0f;
|
||||||
static float prev_max_health;
|
inline static float prev_max_health = 0.0f;
|
||||||
static float prev_armour;
|
inline static float prev_armour = 0.0f;
|
||||||
static float prev_stamina;
|
inline static float prev_stamina = 0.0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool disable_cheats;
|
inline static bool disable_cheats = false;
|
||||||
static bool disable_replay;
|
inline static bool disable_replay = false;
|
||||||
static bool forbidden_area_wl;
|
inline static bool forbidden_area_wl = true;
|
||||||
static bool freeze_mission_timer;
|
inline static bool freeze_mission_timer = false;
|
||||||
static bool freeze_time;
|
inline static bool freeze_time = false;
|
||||||
static bool keep_stuff;
|
inline static bool keep_stuff = false;
|
||||||
static bool solid_water;
|
inline static bool solid_water = false;
|
||||||
static bool ss_shortcut;
|
inline static bool ss_shortcut = false;
|
||||||
static bool sync_time;
|
inline static bool sync_time = false;
|
||||||
static uint sync_time_timer;
|
inline static uint sync_time_timer = 0;
|
||||||
static uint solid_water_object;
|
inline static uint solid_water_object = 0;
|
||||||
|
inline static bool mission_warning_shown = false;
|
||||||
|
|
||||||
struct stat
|
struct stat
|
||||||
{
|
{
|
||||||
static CJson json;
|
inline static CJson json = CJson("stat");
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
};
|
};
|
||||||
|
|
||||||
Game();
|
Game();
|
||||||
static void Draw();
|
static void Draw();
|
||||||
static void FreeCam();
|
static void FreeCam();
|
||||||
static void ClearFreecamStuff();
|
static void ClearFreecamStuff();
|
||||||
|
static void RealTimeClock();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
10
src/Hook.cpp
10
src/Hook.cpp
@ -2,16 +2,6 @@
|
|||||||
#include "kiero/kiero.h"
|
#include "kiero/kiero.h"
|
||||||
#include "kiero/minhook/MinHook.h"
|
#include "kiero/minhook/MinHook.h"
|
||||||
|
|
||||||
WNDPROC Hook::oWndProc = NULL;
|
|
||||||
f_Present11 Hook::oPresent11 = NULL;
|
|
||||||
f_Present9 Hook::oPresent9 = NULL;
|
|
||||||
f_Reset Hook::oReset9 = NULL;
|
|
||||||
|
|
||||||
bool Hook::mouse_visibility = false;
|
|
||||||
bool Hook::show_mouse = false;
|
|
||||||
|
|
||||||
std::function<void()> Hook::window_callback = NULL;
|
|
||||||
|
|
||||||
LRESULT Hook::WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
LRESULT Hook::WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);
|
ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam);
|
||||||
|
14
src/Hook.h
14
src/Hook.h
@ -10,11 +10,11 @@ extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg
|
|||||||
class Hook
|
class Hook
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static WNDPROC oWndProc;
|
inline static WNDPROC oWndProc = NULL;
|
||||||
static f_Present11 oPresent11;
|
inline static f_Present11 oPresent11 = NULL;
|
||||||
static f_Present9 oPresent9;
|
inline static f_Present9 oPresent9 = NULL;
|
||||||
static f_Reset oReset9;
|
inline static f_Reset oReset9 = NULL;
|
||||||
static bool mouse_visibility;
|
inline static bool mouse_visibility = false;
|
||||||
|
|
||||||
static void CALLBACK Present(void* ptr);
|
static void CALLBACK Present(void* ptr);
|
||||||
static HRESULT CALLBACK PresentDx9Handler(IDirect3DDevice9* pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion);
|
static HRESULT CALLBACK PresentDx9Handler(IDirect3DDevice9* pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion);
|
||||||
@ -24,8 +24,8 @@ private:
|
|||||||
static void ShowMouse(bool state);
|
static void ShowMouse(bool state);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static bool show_mouse;
|
inline static bool show_mouse = false;
|
||||||
static std::function<void()> window_callback;
|
inline static std::function<void()> window_callback = NULL;
|
||||||
Hook();
|
Hook();
|
||||||
~Hook();
|
~Hook();
|
||||||
};
|
};
|
||||||
|
28
src/Menu.cpp
28
src/Menu.cpp
@ -7,34 +7,6 @@
|
|||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
bool Menu::overlay::coord = false;
|
|
||||||
bool Menu::overlay::fps = false;
|
|
||||||
bool Menu::overlay::loc_name = false;
|
|
||||||
bool Menu::overlay::transparent = false;
|
|
||||||
bool Menu::overlay::veh_health = false;
|
|
||||||
bool Menu::overlay::veh_speed = false;
|
|
||||||
std::vector<std::string> Menu::overlay::pos_names{ "Custom", "Top left", "Top right", "Bottom left", "Bottom right" };
|
|
||||||
int Menu::overlay::selected_pos = 4;
|
|
||||||
float Menu::overlay::posX = NULL;
|
|
||||||
float Menu::overlay::posY = NULL;
|
|
||||||
|
|
||||||
HotKeyData Menu::hotkeys::aim_skin_changer{};
|
|
||||||
HotKeyData Menu::hotkeys::freecam{};
|
|
||||||
HotKeyData Menu::hotkeys::command_window{};
|
|
||||||
HotKeyData Menu::hotkeys::flip_veh{};
|
|
||||||
HotKeyData Menu::hotkeys::fix_veh{};
|
|
||||||
HotKeyData Menu::hotkeys::free_cam_tp_player{ VK_RETURN,VK_RETURN };
|
|
||||||
HotKeyData Menu::hotkeys::god_mode{};
|
|
||||||
HotKeyData Menu::hotkeys::menu_open{};
|
|
||||||
HotKeyData Menu::hotkeys::quick_ss{};
|
|
||||||
HotKeyData Menu::hotkeys::quick_tp{};
|
|
||||||
HotKeyData Menu::hotkeys::veh_engine{};
|
|
||||||
HotKeyData Menu::hotkeys::veh_instant_start{};
|
|
||||||
HotKeyData Menu::hotkeys::veh_instant_stop{};
|
|
||||||
|
|
||||||
bool Menu::commands::show_menu = false;
|
|
||||||
char Menu::commands::input_buffer[INPUT_BUFFER_SIZE] = "";
|
|
||||||
|
|
||||||
Menu::Menu()
|
Menu::Menu()
|
||||||
{
|
{
|
||||||
// TODO: use structs
|
// TODO: use structs
|
||||||
|
50
src/Menu.h
50
src/Menu.h
@ -5,38 +5,38 @@ class Menu
|
|||||||
private:
|
private:
|
||||||
struct overlay
|
struct overlay
|
||||||
{
|
{
|
||||||
static bool coord;
|
inline static bool coord = false;
|
||||||
static bool fps;
|
inline static bool fps = false;
|
||||||
static bool loc_name;
|
inline static bool loc_name = false;
|
||||||
static bool transparent;
|
inline static bool transparent = false;
|
||||||
static bool veh_health;
|
inline static bool veh_health = false;
|
||||||
static bool veh_speed;
|
inline static bool veh_speed = false;
|
||||||
static std::vector<std::string> pos_names;
|
inline static std::vector<std::string> pos_names = { "Custom", "Top left", "Top right", "Bottom left", "Bottom right" };
|
||||||
static int selected_pos;
|
inline static int selected_pos = 4; // TODO: Create Enum
|
||||||
static float posX;
|
inline static float posX = 0.0f;
|
||||||
static float posY;
|
inline static float posY = 0.0f;
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
struct hotkeys
|
struct hotkeys
|
||||||
{
|
{
|
||||||
static HotKeyData aim_skin_changer;
|
inline static HotKeyData aim_skin_changer;
|
||||||
static HotKeyData freecam;
|
inline static HotKeyData freecam;
|
||||||
static HotKeyData command_window;
|
inline static HotKeyData command_window;
|
||||||
static HotKeyData fix_veh;
|
inline static HotKeyData fix_veh;
|
||||||
static HotKeyData flip_veh;
|
inline static HotKeyData flip_veh;
|
||||||
static HotKeyData free_cam_tp_player;
|
inline static HotKeyData free_cam_tp_player{VK_RETURN,VK_RETURN};
|
||||||
static HotKeyData god_mode;
|
inline static HotKeyData god_mode;
|
||||||
static HotKeyData menu_open;
|
inline static HotKeyData menu_open;
|
||||||
static HotKeyData quick_ss;
|
inline static HotKeyData quick_ss;
|
||||||
static HotKeyData quick_tp;
|
inline static HotKeyData quick_tp;
|
||||||
static HotKeyData veh_engine;
|
inline static HotKeyData veh_engine;
|
||||||
static HotKeyData veh_instant_start;
|
inline static HotKeyData veh_instant_start;
|
||||||
static HotKeyData veh_instant_stop;
|
inline static HotKeyData veh_instant_stop;
|
||||||
};
|
};
|
||||||
struct commands
|
struct commands
|
||||||
{
|
{
|
||||||
static bool show_menu;
|
inline static bool show_menu = false;
|
||||||
static char input_buffer[INPUT_BUFFER_SIZE];
|
inline static char input_buffer[INPUT_BUFFER_SIZE] = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
Menu();
|
Menu();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#define MENU_NAME "Cheat Menu"
|
#define MENU_NAME "Cheat Menu"
|
||||||
#define MENU_VERSION "2.6-beta"
|
#define MENU_VERSION "2.6-beta"
|
||||||
#define BUILD_NUMBER "20210225"
|
#define BUILD_NUMBER "20210303"
|
||||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"
|
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"
|
@ -2,9 +2,6 @@
|
|||||||
#include "Neon.h"
|
#include "Neon.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
VehExtender<Neon::NeonData> Neon::VehNeon;
|
|
||||||
RwTexture* Neon::neon_texture = nullptr;
|
|
||||||
|
|
||||||
void Neon::RenderEvent(CVehicle *pVeh)
|
void Neon::RenderEvent(CVehicle *pVeh)
|
||||||
{
|
{
|
||||||
NeonData* data = &VehNeon.Get(pVeh);
|
NeonData* data = &VehNeon.Get(pVeh);
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
class Neon
|
class Neon
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static RwTexture* neon_texture;
|
|
||||||
|
|
||||||
class NeonData {
|
class NeonData {
|
||||||
public:
|
public:
|
||||||
CRGBA color;
|
CRGBA color;
|
||||||
@ -23,7 +21,8 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static VehExtender<NeonData> VehNeon;
|
inline static RwTexture* neon_texture = nullptr;
|
||||||
|
inline static VehExtender<NeonData> VehNeon;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Neon();
|
Neon();
|
||||||
|
@ -28,12 +28,6 @@
|
|||||||
#include "NodeName.h"
|
#include "NodeName.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
std::vector<std::string> Paint::veh_nodes::names_vec{ "Default" };
|
|
||||||
std::string Paint::veh_nodes::selected = "Default";
|
|
||||||
VehExtender<Paint::VehData> Paint::vehdata;
|
|
||||||
|
|
||||||
std::map<std::string, std::shared_ptr<RwTexture>> Paint::textures;
|
|
||||||
|
|
||||||
void Paint::RenderEvent(CVehicle* pVeh)
|
void Paint::RenderEvent(CVehicle* pVeh)
|
||||||
{
|
{
|
||||||
VehData& data = vehdata.Get(pVeh);
|
VehData& data = vehdata.Get(pVeh);
|
||||||
|
@ -73,15 +73,15 @@ private:
|
|||||||
void resetMaterialTexture(RpMaterial* material);
|
void resetMaterialTexture(RpMaterial* material);
|
||||||
};
|
};
|
||||||
|
|
||||||
static VehExtender<VehData> vehdata;
|
inline static VehExtender<VehData> vehdata;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
static std::map<std::string, std::shared_ptr<RwTexture>> textures;
|
inline static std::map<std::string, std::shared_ptr<RwTexture>> textures;
|
||||||
struct veh_nodes
|
struct veh_nodes
|
||||||
{
|
{
|
||||||
static std::vector<std::string> names_vec;
|
inline static std::vector<std::string> names_vec{ "Default" };
|
||||||
static std::string selected;
|
inline static std::string selected = "Default";
|
||||||
};
|
};
|
||||||
|
|
||||||
Paint();
|
Paint();
|
||||||
|
26
src/Ped.cpp
26
src/Ped.cpp
@ -3,32 +3,6 @@
|
|||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
ImGuiTextFilter Ped::filter = "";
|
|
||||||
std::string Ped::selected_item = "All";
|
|
||||||
std::vector<std::string> Ped::search_categories;
|
|
||||||
std::vector<std::unique_ptr<TextureStructure>> Ped::peds_vec;
|
|
||||||
bool Ped::images_loaded = false;
|
|
||||||
|
|
||||||
CJson Ped::ped_json = CJson("ped");
|
|
||||||
CJson Ped::pedspecial_json = CJson("ped special");
|
|
||||||
|
|
||||||
std::vector<std::string> Ped::gang_names = { "Ballas", "Grove street families", "Los santos vagos", "San fierro rifa",
|
|
||||||
"Da nang boys", "Mafia", "Mountain cloud triad", "Varrio los aztecas", "Gang9", "Gang10" };
|
|
||||||
|
|
||||||
bool Ped::exgangwars_installed = false;
|
|
||||||
int Ped::ped_remove_radius = 5;
|
|
||||||
|
|
||||||
std::vector<CPed*> Ped::spawn_ped::list;
|
|
||||||
int Ped::spawn_ped::accuracy = 50;
|
|
||||||
int Ped::spawn_ped::health = 100;
|
|
||||||
int Ped::spawn_ped::selected_ped_type = 0;
|
|
||||||
bool Ped::spawn_ped::dont_move = false;
|
|
||||||
bool Ped::spawn_ped::ped_bleed = false;
|
|
||||||
int Ped::spawn_ped::weapon_id = 0;
|
|
||||||
|
|
||||||
std::vector<std::string> Ped::spawn_ped::ped_type = { "Civ male","Civ female","Cop","Ballas","Grove Street Families","Los Santos Vagos",
|
|
||||||
"San Fierro Rifa","Da Nang Boys","Mafia","Mountain Cloud Triads","Varrio Los Aztecas",
|
|
||||||
"Gang 9","Medic","Dealer","Criminal","Fireman","Prostitute" };
|
|
||||||
Ped::Ped()
|
Ped::Ped()
|
||||||
{
|
{
|
||||||
if (GetModuleHandle("ExGangWars.asi"))
|
if (GetModuleHandle("ExGangWars.asi"))
|
||||||
|
46
src/Ped.h
46
src/Ped.h
@ -5,29 +5,37 @@
|
|||||||
class Ped
|
class Ped
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::vector<std::unique_ptr<TextureStructure>> peds_vec;
|
inline static std::vector<std::unique_ptr<TextureStructure>> peds_vec;
|
||||||
static bool images_loaded;
|
inline static bool images_loaded = false;
|
||||||
|
|
||||||
static CJson ped_json;
|
inline static CJson ped_json = CJson("ped");
|
||||||
static CJson pedspecial_json;
|
inline static CJson pedspecial_json = CJson("ped special");
|
||||||
|
|
||||||
static std::vector<std::string> gang_names;
|
inline static std::vector<std::string> gang_names =
|
||||||
static bool exgangwars_installed;
|
{
|
||||||
|
"Ballas", "Grove street families", "Los santos vagos", "San fierro rifa",
|
||||||
static int ped_remove_radius;
|
"Da nang boys", "Mafia", "Mountain cloud triad", "Varrio los aztecas", "Gang9", "Gang10"
|
||||||
|
};
|
||||||
|
inline static bool exgangwars_installed = false;
|
||||||
|
inline static int ped_remove_radius = 5;
|
||||||
|
|
||||||
struct spawn_ped {
|
struct spawn_ped {
|
||||||
static std::vector<CPed*> list;
|
inline static std::vector<CPed*> list;
|
||||||
static int accuracy;
|
inline static int accuracy = 50;
|
||||||
static int health;
|
inline static int health = 100;
|
||||||
static bool dont_move;
|
inline static bool dont_move = false;
|
||||||
static bool ped_bleed;
|
inline static bool ped_bleed = false;
|
||||||
static std::vector<std::string> ped_type;
|
inline static std::vector<std::string> ped_type =
|
||||||
static int selected_ped_type;
|
{
|
||||||
static int weapon_id;
|
"Civ male","Civ female","Cop","Ballas","Grove Street Families","Los Santos Vagos",
|
||||||
|
"San Fierro Rifa","Da Nang Boys","Mafia","Mountain Cloud Triads","Varrio Los Aztecas",
|
||||||
|
"Gang 9","Medic","Dealer","Criminal","Fireman","Prostitute"
|
||||||
|
};
|
||||||
|
inline static int selected_ped_type;
|
||||||
|
inline static int weapon_id = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
friend class Player;
|
friend class Player;
|
||||||
|
@ -5,25 +5,7 @@
|
|||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
bool Player::keep_position::state = false;
|
inline static void PlayerModelBrokenFix()
|
||||||
CVector Player::keep_position::pos = CVector();
|
|
||||||
bool Player::god_mode = false;
|
|
||||||
int Player::body = 0;
|
|
||||||
bool Player::aim_skin_changer = false;
|
|
||||||
|
|
||||||
ImGuiTextFilter Player::filter = "";
|
|
||||||
std::vector<std::string> Player::search_categories;
|
|
||||||
std::vector<std::unique_ptr<TextureStructure>> Player::clothes_vec;
|
|
||||||
std::string Player::selected_item = "All";
|
|
||||||
bool Player::images_loaded = false;
|
|
||||||
|
|
||||||
std::string Player::custom_skins::dir = paths::GetGameDirPathA() + std::string("\\modloader\\Custom Skins\\");
|
|
||||||
std::vector<std::string> Player::custom_skins::store_vec;
|
|
||||||
ImGuiTextFilter Player::custom_skins::filter = "";
|
|
||||||
|
|
||||||
bool Player::modloader_installed = false;
|
|
||||||
|
|
||||||
static void PlayerModelBrokenFix()
|
|
||||||
{
|
{
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
|
|
||||||
|
30
src/Player.h
30
src/Player.h
@ -4,30 +4,30 @@ class Player
|
|||||||
private:
|
private:
|
||||||
struct keep_position
|
struct keep_position
|
||||||
{
|
{
|
||||||
static bool state;
|
inline static bool state = false;
|
||||||
static CVector pos;
|
inline static CVector pos;
|
||||||
};
|
};
|
||||||
static bool god_mode;
|
inline static bool god_mode = false;
|
||||||
static int body;
|
inline static int body = 0;
|
||||||
static bool aim_skin_changer;
|
inline static bool aim_skin_changer = false;
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::vector<std::unique_ptr<TextureStructure>> clothes_vec;
|
inline static std::vector<std::unique_ptr<TextureStructure>> clothes_vec;
|
||||||
static bool images_loaded;
|
inline static bool images_loaded = false;
|
||||||
|
|
||||||
struct custom_skins
|
struct custom_skins
|
||||||
{
|
{
|
||||||
static std::string dir;
|
inline static std::string dir = paths::GetGameDirPathA() + std::string("\\modloader\\Custom Skins\\");;
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::vector<std::string> store_vec;
|
inline static std::vector<std::string> store_vec;
|
||||||
};
|
};
|
||||||
static bool modloader_installed;
|
inline static bool modloader_installed = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Player();
|
||||||
static void ChangePlayerCloth(std::string& model);
|
static void ChangePlayerCloth(std::string& model);
|
||||||
static void ChangePlayerModel(std::string& model);
|
static void ChangePlayerModel(std::string& model);
|
||||||
Player();
|
|
||||||
static void Draw();
|
static void Draw();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,23 +7,6 @@
|
|||||||
// FlA
|
// FlA
|
||||||
tRadarTrace* CRadar::ms_RadarTrace = reinterpret_cast<tRadarTrace *>(patch::GetPointer(0x5838B0 + 2));
|
tRadarTrace* CRadar::ms_RadarTrace = reinterpret_cast<tRadarTrace *>(patch::GetPointer(0x5838B0 + 2));
|
||||||
|
|
||||||
bool Teleport::insert_coord = false;
|
|
||||||
bool Teleport::quick_teleport = false;
|
|
||||||
char Teleport::input_buffer[INPUT_BUFFER_SIZE] = "";
|
|
||||||
char Teleport::location_buffer[INPUT_BUFFER_SIZE] = "";
|
|
||||||
|
|
||||||
CVector Teleport::STeleport::pos{ -1, -1, -1 };
|
|
||||||
bool Teleport::STeleport::_bool = false;
|
|
||||||
uint Teleport::STeleport::timer = 0;
|
|
||||||
ImGuiTextFilter Teleport::filter = "";
|
|
||||||
std::vector<std::string> Teleport::search_categories;
|
|
||||||
std::string Teleport::selected_item = "All";
|
|
||||||
|
|
||||||
uint quick_teleport_timer = 0;
|
|
||||||
|
|
||||||
CJson Teleport::json = CJson("teleport");
|
|
||||||
CJson Teleport::sprite_name_json = CJson("radar sprite");
|
|
||||||
|
|
||||||
void Teleport::FetchRadarSpriteData()
|
void Teleport::FetchRadarSpriteData()
|
||||||
{
|
{
|
||||||
uint cur_timer = CTimer::m_snTimeInMilliseconds;
|
uint cur_timer = CTimer::m_snTimeInMilliseconds;
|
||||||
|
@ -5,23 +5,24 @@
|
|||||||
class Teleport
|
class Teleport
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static bool insert_coord;
|
inline static bool insert_coord = false;
|
||||||
static bool quick_teleport;
|
inline static bool quick_teleport = false;
|
||||||
static char input_buffer[INPUT_BUFFER_SIZE];
|
inline static char input_buffer[INPUT_BUFFER_SIZE] = "";
|
||||||
static CJson json;
|
inline static CJson json = CJson("teleport");
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
static char location_buffer[INPUT_BUFFER_SIZE];
|
inline static char location_buffer[INPUT_BUFFER_SIZE] = "";
|
||||||
|
inline static uint quick_teleport_timer = 0;
|
||||||
|
|
||||||
struct STeleport
|
struct STeleport
|
||||||
{
|
{
|
||||||
static bool _bool;
|
inline static bool _bool = false;
|
||||||
static CVector pos;
|
inline static CVector pos = { -1, -1, -1 };
|
||||||
static uint timer;
|
inline static uint timer = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
static CJson sprite_name_json;
|
inline static CJson sprite_name_json = CJson("radar sprite");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Generates radar sprite coordinates on the fly.
|
Generates radar sprite coordinates on the fly.
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#include "plugin.h"
|
|
||||||
|
|
||||||
uchar* m_nDirectionalMult = (uchar*)0x55F7C7; //m_nDirectionalMult[184]
|
uchar* m_nDirectionalMult = (uchar*)0x55F7C7; //m_nDirectionalMult[184]
|
||||||
|
|
||||||
uchar* m_nWaterFogAlpha = (uchar*)0x55F7B8; //m_nWaterFogAlpha[184]
|
uchar* m_nWaterFogAlpha = (uchar*)0x55F7B8; //m_nWaterFogAlpha[184]
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
|
|
||||||
std::string Ui::current_hotkey = "";
|
|
||||||
|
|
||||||
static Ui::JsonPopUpData json_popup;
|
|
||||||
static Ui::ImgPopUpData img_popup;
|
|
||||||
|
|
||||||
bool Ui::ListBox(const char* label, std::vector<std::string>& all_items, int& selected)
|
bool Ui::ListBox(const char* label, std::vector<std::string>& all_items, int& selected)
|
||||||
{
|
{
|
||||||
bool rtn = false;
|
bool rtn = false;
|
||||||
|
6
src/Ui.h
6
src/Ui.h
@ -5,7 +5,8 @@ class Ui
|
|||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::string current_hotkey;
|
inline static std::string current_hotkey = "";
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct NamedMemory {
|
struct NamedMemory {
|
||||||
std::string name;
|
std::string name;
|
||||||
@ -30,6 +31,9 @@ public:
|
|||||||
std::function<void(std::string&)> function;
|
std::function<void(std::string&)> function;
|
||||||
std::string value;
|
std::string value;
|
||||||
};
|
};
|
||||||
|
inline static JsonPopUpData json_popup;
|
||||||
|
inline static ImgPopUpData img_popup;
|
||||||
|
|
||||||
static void CenterdText(const std::string& text);
|
static void CenterdText(const std::string& text);
|
||||||
static bool ColorButton(int color_id, std::vector<float>& color, ImVec2 size);
|
static bool ColorButton(int color_id, std::vector<float>& color, ImVec2 size);
|
||||||
static bool CheckboxAddress(const char* label, const int addr = NULL, const char* hint = nullptr);
|
static bool CheckboxAddress(const char* label, const int addr = NULL, const char* hint = nullptr);
|
||||||
|
@ -5,25 +5,43 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "CVehicle.h"
|
#include "CVehicle.h"
|
||||||
|
#include "Events.h"
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class VehExtender
|
class VehExtender
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
inline static std::vector<std::pair<CVehicle*,T>> data;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VehExtender(){};
|
static void RemoveVehEntry(CVehicle *pVeh)
|
||||||
VehExtender(const VehExtender&) = delete;
|
|
||||||
|
|
||||||
T& Get(CVehicle *veh)
|
|
||||||
{
|
{
|
||||||
static std::vector<std::pair<CVehicle*,T>> data;
|
|
||||||
|
|
||||||
for (auto it = data.begin(); it < data.end(); ++it)
|
for (auto it = data.begin(); it < data.end(); ++it)
|
||||||
{
|
{
|
||||||
if (it->first == veh)
|
if (it->first == pVeh)
|
||||||
|
data.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VehExtender()
|
||||||
|
{
|
||||||
|
plugin::Events::vehicleCtorEvent.after += RemoveVehEntry;
|
||||||
|
}
|
||||||
|
~VehExtender()
|
||||||
|
{
|
||||||
|
plugin::Events::vehicleCtorEvent.after -= RemoveVehEntry;
|
||||||
|
}
|
||||||
|
VehExtender(const VehExtender&) = delete;
|
||||||
|
|
||||||
|
T& Get(CVehicle *pVeh)
|
||||||
|
{
|
||||||
|
for (auto it = data.begin(); it < data.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->first == pVeh)
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.push_back({veh, T(veh)});
|
data.push_back({pVeh, T(pVeh)});
|
||||||
return data.back().second;
|
return data.back().second;
|
||||||
}
|
}
|
||||||
};
|
};
|
@ -4,71 +4,6 @@
|
|||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
bool Vehicle::bike_fly = false;
|
|
||||||
bool Vehicle::dont_fall_bike = false;
|
|
||||||
bool Vehicle::veh_heavy = false;
|
|
||||||
bool Vehicle::veh_watertight = false;
|
|
||||||
bool Vehicle::veh_nodmg = false;
|
|
||||||
int Vehicle::veh_remove_radius = 5;
|
|
||||||
bool Vehicle::lock_speed = false;
|
|
||||||
float Vehicle::lock_speed_val = 0;
|
|
||||||
|
|
||||||
int Vehicle::door_menu_button = 0;
|
|
||||||
std::string Vehicle::door_names[6] = { "Hood","Boot","Front left door","Front right door","Rear left door","Rear right door" };
|
|
||||||
|
|
||||||
std::map<int, std::string> Vehicle::vehicle_ide;
|
|
||||||
std::vector<std::vector<float>> Vehicle::carcols_color_values;
|
|
||||||
std::map<std::string, std::vector<int>> Vehicle::carcols_car_data;
|
|
||||||
|
|
||||||
int Vehicle::color::radio_btn = 1;
|
|
||||||
bool Vehicle::color::show_all = false;
|
|
||||||
bool Vehicle::color::material_filter = true;
|
|
||||||
float Vehicle::color::color_picker[3]{ 0,0,0 };
|
|
||||||
|
|
||||||
ImGuiTextFilter Vehicle::spawner::filter = "";
|
|
||||||
std::vector<std::string> Vehicle::spawner::search_categories;
|
|
||||||
std::vector<std::unique_ptr<TextureStructure>> Vehicle::spawner::image_vec;
|
|
||||||
std::string Vehicle::spawner::selected_item = "All";
|
|
||||||
bool Vehicle::spawner::spawn_inside = true;
|
|
||||||
bool Vehicle::spawner::spawn_in_air = true;
|
|
||||||
char Vehicle::spawner::license_text[9] = "";
|
|
||||||
|
|
||||||
ImGuiTextFilter Vehicle::texture9::filter = "";
|
|
||||||
std::vector<std::string> Vehicle::texture9::search_categories;
|
|
||||||
std::vector<std::unique_ptr<TextureStructure>> Vehicle::texture9::image_vec;
|
|
||||||
std::string Vehicle::texture9::selected_item = "All";
|
|
||||||
|
|
||||||
ImGuiTextFilter Vehicle::tune::filter = "";
|
|
||||||
std::vector<std::string> Vehicle::tune::search_categories;
|
|
||||||
std::vector<std::unique_ptr<TextureStructure>> Vehicle::tune::image_vec;
|
|
||||||
std::string Vehicle::tune::selected_item = "All";
|
|
||||||
bool Vehicle::images_loaded = false;
|
|
||||||
|
|
||||||
float Vehicle::neon::color_picker[3]{ 0,0,0 };
|
|
||||||
bool Vehicle::neon::rainbow = false;
|
|
||||||
uint Vehicle::neon::rainbow_timer = 0;
|
|
||||||
bool Vehicle::neon::traffic = false;
|
|
||||||
uint Vehicle::neon::traffic_timer = 0;
|
|
||||||
|
|
||||||
bool Vehicle::unlimited_nitro::enabled = false;
|
|
||||||
bool Vehicle::unlimited_nitro::comp_added = false;
|
|
||||||
|
|
||||||
static std::vector<std::string>(handling_flag_names) = // 32 flags
|
|
||||||
{
|
|
||||||
"1G_BOOST","2G_BOOST","NPC_ANTI_ROLL","NPC_NEUTRAL_HANDL","NO_HANDBRAKE","STEER_REARWHEELS","HB_REARWHEEL_STEER","ALT_STEER_OPT",
|
|
||||||
"WHEEL_F_NARROW2","WHEEL_F_NARROW","WHEEL_F_WIDE","WHEEL_F_WIDE2","WHEEL_R_NARROW2","WHEEL_R_NARROW","WHEEL_R_WIDE","WHEEL_R_WIDE2",
|
|
||||||
"HYDRAULIC_GEOM","HYDRAULIC_INST","HYDRAULIC_NONE","NOS_INST","OFFROAD_ABILITY","OFFROAD_ABILITY2","HALOGEN_LIGHTS","PROC_REARWHEEL_1ST",
|
|
||||||
"USE_MAXSP_LIMIT","LOW_RIDER","STREET_RACER","SWINGING_CHASSIS","Unused 1","Unused 2","Unused 3","Unused 4"
|
|
||||||
};
|
|
||||||
|
|
||||||
static std::vector<std::string>(model_flag_names) = // 32 flags
|
|
||||||
{
|
|
||||||
"IS_VAN","IS_BUS","IS_LOW","IS_BIG","REVERSE_BONNET","HANGING_BOOT","TAILGATE_BOOT","NOSWING_BOOT","NO_DOORS","TANDEM_SEATS",
|
|
||||||
"SIT_IN_BOAT","CONVERTIBLE","NO_EXHAUST","DOUBLE_EXHAUST","NO1FPS_LOOK_BEHIND","FORCE_DOOR_CHECK","AXLE_F_NOTILT","AXLE_F_SOLID","AXLE_F_MCPHERSON",
|
|
||||||
"AXLE_F_REVERSE","AXLE_R_NOTILT","AXLE_R_SOLID","AXLE_R_MCPHERSON","AXLE_R_REVERSE","IS_BIKE","IS_HELI","IS_PLANE","IS_BOAT","BOUNCE_PANELS",
|
|
||||||
"DOUBLE_RWHEELS","FORCE_GROUND_CLEARANCE","IS_HATCHBAC1K"
|
|
||||||
};
|
|
||||||
|
|
||||||
Vehicle::Vehicle()
|
Vehicle::Vehicle()
|
||||||
{
|
{
|
||||||
ParseVehiclesIDE();
|
ParseVehiclesIDE();
|
||||||
|
@ -5,72 +5,90 @@
|
|||||||
class Vehicle : Paint, Neon
|
class Vehicle : Paint, Neon
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static bool bike_fly;
|
inline static bool bike_fly = false;
|
||||||
static bool dont_fall_bike;
|
inline static bool dont_fall_bike = false;
|
||||||
static bool veh_heavy;
|
inline static bool veh_heavy = false;
|
||||||
static bool veh_watertight;
|
inline static bool veh_watertight = false;
|
||||||
static bool veh_nodmg;
|
inline static bool veh_nodmg = false;
|
||||||
static int door_menu_button;
|
inline static int door_menu_button = 0;
|
||||||
static std::string door_names[6];
|
inline static std::string door_names[6] =
|
||||||
static int veh_remove_radius;
|
{ "Hood","Boot","Front left door","Front right door","Rear left door","Rear right door" };
|
||||||
|
inline static int veh_remove_radius = 0;
|
||||||
|
|
||||||
static bool lock_speed;
|
inline static bool lock_speed = false;
|
||||||
static float lock_speed_val;
|
inline static float lock_speed_val = 0.0f;
|
||||||
|
|
||||||
static std::map<int, std::string> vehicle_ide;
|
inline static std::map<int, std::string> vehicle_ide;
|
||||||
static std::vector<std::vector<float>> carcols_color_values;
|
inline static std::vector<std::vector<float>> carcols_color_values;
|
||||||
static std::map<std::string, std::vector<int>> carcols_car_data;
|
inline static std::map<std::string, std::vector<int>> carcols_car_data;
|
||||||
|
|
||||||
struct color
|
struct color
|
||||||
{
|
{
|
||||||
static bool material_filter;
|
inline static bool material_filter = true;
|
||||||
static int radio_btn;
|
inline static int radio_btn = 1;
|
||||||
static bool show_all;
|
inline static bool show_all = false;
|
||||||
static float color_picker[3];
|
inline static float color_picker[3]{ 0,0,0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
struct neon
|
struct neon
|
||||||
{
|
{
|
||||||
static float color_picker[3];
|
inline static float color_picker[3]{ 0,0,0 };
|
||||||
static bool rainbow;
|
inline static bool rainbow = false;
|
||||||
static uint rainbow_timer;
|
inline static uint rainbow_timer = 0;
|
||||||
static bool traffic;
|
inline static bool traffic = false;
|
||||||
static uint traffic_timer;
|
inline static uint traffic_timer = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct spawner
|
struct spawner
|
||||||
{
|
{
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::vector<std::unique_ptr<TextureStructure>> image_vec;
|
inline static std::vector<std::unique_ptr<TextureStructure>> image_vec;
|
||||||
static bool spawn_inside;
|
inline static bool spawn_inside = true;
|
||||||
static bool spawn_in_air;
|
inline static bool spawn_in_air = true;
|
||||||
static char license_text[9];
|
inline static char license_text[9] = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
struct texture9
|
struct texture9
|
||||||
{
|
{
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::vector<std::unique_ptr<TextureStructure>> image_vec;
|
inline static std::vector<std::unique_ptr<TextureStructure>> image_vec;
|
||||||
};
|
};
|
||||||
static bool images_loaded;
|
inline static bool images_loaded = false;
|
||||||
|
|
||||||
struct tune
|
struct tune
|
||||||
{
|
{
|
||||||
static ImGuiTextFilter filter;
|
inline static ImGuiTextFilter filter = "";
|
||||||
static std::string selected_item;
|
inline static std::string selected_item = "All";
|
||||||
static std::vector<std::string> search_categories;
|
inline static std::vector<std::string> search_categories;
|
||||||
static std::vector<std::unique_ptr<TextureStructure>> image_vec;
|
inline static std::vector<std::unique_ptr<TextureStructure>> image_vec;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct unlimited_nitro
|
struct unlimited_nitro
|
||||||
{
|
{
|
||||||
static bool enabled;
|
inline static bool enabled = false;
|
||||||
static bool comp_added;
|
inline static bool comp_added = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline static std::vector<std::string>(handling_flag_names) = // 32 flags
|
||||||
|
{
|
||||||
|
"1G_BOOST","2G_BOOST","NPC_ANTI_ROLL","NPC_NEUTRAL_HANDL","NO_HANDBRAKE","STEER_REARWHEELS","HB_REARWHEEL_STEER","ALT_STEER_OPT",
|
||||||
|
"WHEEL_F_NARROW2","WHEEL_F_NARROW","WHEEL_F_WIDE","WHEEL_F_WIDE2","WHEEL_R_NARROW2","WHEEL_R_NARROW","WHEEL_R_WIDE","WHEEL_R_WIDE2",
|
||||||
|
"HYDRAULIC_GEOM","HYDRAULIC_INST","HYDRAULIC_NONE","NOS_INST","OFFROAD_ABILITY","OFFROAD_ABILITY2","HALOGEN_LIGHTS","PROC_REARWHEEL_1ST",
|
||||||
|
"USE_MAXSP_LIMIT","LOW_RIDER","STREET_RACER","SWINGING_CHASSIS","Unused 1","Unused 2","Unused 3","Unused 4"
|
||||||
|
};
|
||||||
|
|
||||||
|
inline static std::vector<std::string>(model_flag_names) = // 32 flags
|
||||||
|
{
|
||||||
|
"IS_VAN","IS_BUS","IS_LOW","IS_BIG","REVERSE_BONNET","HANGING_BOOT","TAILGATE_BOOT","NOSWING_BOOT","NO_DOORS","TANDEM_SEATS",
|
||||||
|
"SIT_IN_BOAT","CONVERTIBLE","NO_EXHAUST","DOUBLE_EXHAUST","NO1FPS_LOOK_BEHIND","FORCE_DOOR_CHECK","AXLE_F_NOTILT","AXLE_F_SOLID","AXLE_F_MCPHERSON",
|
||||||
|
"AXLE_F_REVERSE","AXLE_R_NOTILT","AXLE_R_SOLID","AXLE_R_MCPHERSON","AXLE_R_REVERSE","IS_BIKE","IS_HELI","IS_PLANE","IS_BOAT","BOUNCE_PANELS",
|
||||||
|
"DOUBLE_RWHEELS","FORCE_GROUND_CLEARANCE","IS_HATCHBAC1K"
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void AddComponent(const std::string& component, const bool display_message = true);
|
static void AddComponent(const std::string& component, const bool display_message = true);
|
||||||
static void RemoveComponent(const std::string& component, const bool display_message = true);
|
static void RemoveComponent(const std::string& component, const bool display_message = true);
|
||||||
|
@ -6,26 +6,6 @@
|
|||||||
#include "CHudColours.h"
|
#include "CHudColours.h"
|
||||||
#include "TimeCycle.h"
|
#include "TimeCycle.h"
|
||||||
|
|
||||||
|
|
||||||
bool Visual::lock_weather = false;
|
|
||||||
int Visual::weather_type_backup = 0;
|
|
||||||
int Visual::timecyc_hour = 8;
|
|
||||||
|
|
||||||
std::vector<std::string> Visual::weather_names{
|
|
||||||
"EXTRASUNNY LA","SUNNY LA","EXTRASUNNY SMOG LA","SUNNY SMOG LA","CLOUDY LA","SUNNY SF","EXTRASUNNY SF","CLOUDY SF","RAINY SF","FOGGY SF",
|
|
||||||
"SUNNY VEGAS","EXTRASUNNY VEGAS","CLOUDY VEGAS","EXTRASUNNY COUNTRYSIDE","SUNNY COUNTRYSIDE","CLOUDY COUNTRYSIDE","RAINY COUNTRYSIDE",
|
|
||||||
"EXTRASUNNY DESERT","SUNNY DESERT","SANDSTORM DESERT","UNDERWATER","EXTRACOLOURS 1","EXTRACOLOURS 2"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Let's just use our own variables
|
|
||||||
static float radar_posX;
|
|
||||||
static float radar_posY;
|
|
||||||
static float radar_width = 76.0f;
|
|
||||||
static float radar_height = 104.0f;
|
|
||||||
static CHudColour health_bar;
|
|
||||||
//static CHudColour armour_bar;
|
|
||||||
static bool init_patches = false;
|
|
||||||
|
|
||||||
Visual::Visual()
|
Visual::Visual()
|
||||||
{
|
{
|
||||||
if (GetModuleHandle("timecycle24.asi"))
|
if (GetModuleHandle("timecycle24.asi"))
|
||||||
@ -226,17 +206,17 @@ void Visual::Draw()
|
|||||||
}
|
}
|
||||||
if (ImGui::BeginTabItem("Menus"))
|
if (ImGui::BeginTabItem("Menus"))
|
||||||
{
|
{
|
||||||
|
static bool init_patches = false;
|
||||||
|
static float radar_posX = *(float*)*(int*)0x5834D4;
|
||||||
|
static float radar_posY = *(float*)*(int*)0x583500;
|
||||||
|
static float radar_width = *(float*)*(int*)0x5834C2;
|
||||||
|
static float radar_height = *(float*)*(int*)0x5834F6;
|
||||||
|
static CHudColour health_bar = HudColour.m_aColours[0];
|
||||||
|
|
||||||
if (!init_patches)
|
if (!init_patches)
|
||||||
{
|
{
|
||||||
// read those values from game
|
// read those values from game
|
||||||
health_bar = HudColour.m_aColours[0];
|
health_bar = HudColour.m_aColours[0];
|
||||||
//armour_bar = HudColour.m_aColours[4];
|
|
||||||
|
|
||||||
radar_posX = *(float*)*(int*)0x5834D4;
|
|
||||||
radar_posY = *(float*)*(int*)0x583500;
|
|
||||||
radar_height = *(float*)*(int*)0x5834F6;
|
|
||||||
radar_width = *(float*)*(int*)0x5834C2;
|
|
||||||
|
|
||||||
// patch radar stuff oof
|
// patch radar stuff oof
|
||||||
patch::SetPointer(0x5834D4, &radar_posX);
|
patch::SetPointer(0x5834D4, &radar_posX);
|
||||||
@ -262,7 +242,6 @@ void Visual::Draw()
|
|||||||
patch::SetPointer(0x58A99D, &radar_width);
|
patch::SetPointer(0x58A99D, &radar_width);
|
||||||
|
|
||||||
patch::SetPointer(0x589331, &health_bar);
|
patch::SetPointer(0x589331, &health_bar);
|
||||||
//patch::SetPointer(0x5890FC,&armour_bar);
|
|
||||||
init_patches = true;
|
init_patches = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
src/Visual.h
13
src/Visual.h
@ -2,12 +2,17 @@
|
|||||||
class Visual
|
class Visual
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static bool lock_weather;
|
inline static bool lock_weather = false;
|
||||||
static int weather_type_backup;
|
inline static int weather_type_backup = 0;
|
||||||
|
|
||||||
// Timecyc
|
// Timecyc
|
||||||
static std::vector<std::string> weather_names;
|
inline static int timecyc_hour = 8;
|
||||||
static int timecyc_hour;
|
inline static std::vector<std::string> weather_names
|
||||||
|
{
|
||||||
|
"EXTRASUNNY LA","SUNNY LA","EXTRASUNNY SMOG LA","SUNNY SMOG LA","CLOUDY LA","SUNNY SF","EXTRASUNNY SF","CLOUDY SF","RAINY SF","FOGGY SF",
|
||||||
|
"SUNNY VEGAS","EXTRASUNNY VEGAS","CLOUDY VEGAS","EXTRASUNNY COUNTRYSIDE","SUNNY COUNTRYSIDE","CLOUDY COUNTRYSIDE","RAINY COUNTRYSIDE",
|
||||||
|
"EXTRASUNNY DESERT","SUNNY DESERT","SANDSTORM DESERT","UNDERWATER","EXTRACOLOURS 1","EXTRACOLOURS 2"
|
||||||
|
};
|
||||||
|
|
||||||
static void GenerateTimecycFile();
|
static void GenerateTimecycFile();
|
||||||
static int GetCurrentHourTimeId();
|
static int GetCurrentHourTimeId();
|
||||||
|
@ -2,42 +2,7 @@
|
|||||||
#include "Weapon.h"
|
#include "Weapon.h"
|
||||||
#include "Ui.h"
|
#include "Ui.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
#include "Ped.h"
|
||||||
ImGuiTextFilter Weapon::filter = "";
|
|
||||||
std::string Weapon::selected_item = "All";
|
|
||||||
std::vector<std::string> Weapon::search_categories;
|
|
||||||
std::vector<std::unique_ptr<TextureStructure>> Weapon::weapon_vec;
|
|
||||||
bool Weapon::images_loaded = false;
|
|
||||||
|
|
||||||
CJson Weapon::weapon_json = CJson("weapon");
|
|
||||||
bool Weapon::auto_aim = false;
|
|
||||||
bool Weapon::fast_reload = false;
|
|
||||||
bool Weapon::huge_damage = false;
|
|
||||||
bool Weapon::long_range = false;
|
|
||||||
bool Weapon::rapid_fire = false;
|
|
||||||
bool Weapon::dual_weild = false;
|
|
||||||
bool Weapon::move_aim = false;
|
|
||||||
bool Weapon::move_fire = false;
|
|
||||||
|
|
||||||
uchar Weapon::cur_weapon_slot = -1;
|
|
||||||
int Weapon::ammo_count = 99999;
|
|
||||||
|
|
||||||
int Weapon::selected_gang = 0;
|
|
||||||
int Weapon::selected_weapon_count = 0;
|
|
||||||
|
|
||||||
int Weapon::gang_weapons[10][3] =
|
|
||||||
{
|
|
||||||
{WEAPON_PISTOL, WEAPON_MICRO_UZI, WEAPON_UNARMED }, // Ballas
|
|
||||||
{WEAPON_PISTOL, WEAPON_UNARMED, WEAPON_UNARMED}, // Grove
|
|
||||||
{WEAPON_PISTOL, WEAPON_UNARMED, WEAPON_UNARMED}, // Vagos
|
|
||||||
{WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // SF Rifa
|
|
||||||
{WEAPON_PISTOL, WEAPON_MICRO_UZI, WEAPON_UNARMED}, // Da Nang Boys
|
|
||||||
{WEAPON_DESERT_EAGLE , WEAPON_UNARMED, WEAPON_UNARMED}, // Mafia
|
|
||||||
{WEAPON_PISTOL, WEAPON_AK47, WEAPON_UNARMED}, // Triads
|
|
||||||
{WEAPON_PISTOL, WEAPON_MICRO_UZI, WEAPON_UNARMED}, // VLA
|
|
||||||
{WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // Gang 9
|
|
||||||
{WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // Gang 10
|
|
||||||
};
|
|
||||||
|
|
||||||
Weapon::Weapon()
|
Weapon::Weapon()
|
||||||
{
|
{
|
||||||
|
65
src/Weapon.h
65
src/Weapon.h
@ -1,35 +1,44 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Ped.h"
|
|
||||||
class Weapon
|
class Weapon
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
static ImGuiTextFilter filter;
|
|
||||||
static std::string selected_item;
|
|
||||||
static std::vector<std::string> search_categories;
|
|
||||||
static std::vector<std::unique_ptr<TextureStructure>> weapon_vec;
|
|
||||||
static bool images_loaded;
|
|
||||||
|
|
||||||
static CJson weapon_json;
|
|
||||||
|
|
||||||
static bool auto_aim;
|
|
||||||
static bool fast_reload;
|
|
||||||
static bool huge_damage;
|
|
||||||
static bool long_range;
|
|
||||||
static bool rapid_fire;
|
|
||||||
static bool dual_weild;
|
|
||||||
static bool move_aim;
|
|
||||||
static bool move_fire;
|
|
||||||
|
|
||||||
static int ammo_count;
|
|
||||||
static uchar cur_weapon_slot;
|
|
||||||
|
|
||||||
static int selected_gang;
|
|
||||||
static int selected_weapon_count;
|
|
||||||
static int cur_weapon;
|
|
||||||
static int gang_weapons[10][3];
|
|
||||||
|
|
||||||
friend class Ped;
|
|
||||||
public:
|
public:
|
||||||
|
inline static ImGuiTextFilter filter = "";
|
||||||
|
inline static std::string selected_item = "All";
|
||||||
|
inline static std::vector<std::string> search_categories;
|
||||||
|
inline static std::vector<std::unique_ptr<TextureStructure>> weapon_vec;
|
||||||
|
inline static bool images_loaded = false;
|
||||||
|
|
||||||
|
inline static CJson weapon_json = CJson("weapon");
|
||||||
|
|
||||||
|
inline static bool auto_aim = false;
|
||||||
|
inline static bool fast_reload = false;
|
||||||
|
inline static bool huge_damage = false;
|
||||||
|
inline static bool long_range = false;
|
||||||
|
inline static bool rapid_fire = false;
|
||||||
|
inline static bool dual_weild = false;
|
||||||
|
inline static bool move_aim = false;
|
||||||
|
inline static bool move_fire = false;
|
||||||
|
|
||||||
|
inline static int ammo_count = 99999;
|
||||||
|
inline static uchar cur_weapon_slot = -1;
|
||||||
|
|
||||||
|
inline static int selected_gang = 0;
|
||||||
|
inline static int selected_weapon_count = 0;
|
||||||
|
inline static int gang_weapons[10][3] =
|
||||||
|
{
|
||||||
|
{WEAPON_PISTOL, WEAPON_MICRO_UZI, WEAPON_UNARMED }, // Ballas
|
||||||
|
{WEAPON_PISTOL, WEAPON_UNARMED, WEAPON_UNARMED}, // Grove
|
||||||
|
{WEAPON_PISTOL, WEAPON_UNARMED, WEAPON_UNARMED}, // Vagos
|
||||||
|
{WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // SF Rifa
|
||||||
|
{WEAPON_PISTOL, WEAPON_MICRO_UZI, WEAPON_UNARMED}, // Da Nang Boys
|
||||||
|
{WEAPON_DESERT_EAGLE , WEAPON_UNARMED, WEAPON_UNARMED}, // Mafia
|
||||||
|
{WEAPON_PISTOL, WEAPON_AK47, WEAPON_UNARMED}, // Triads
|
||||||
|
{WEAPON_PISTOL, WEAPON_MICRO_UZI, WEAPON_UNARMED}, // VLA
|
||||||
|
{WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // Gang 9
|
||||||
|
{WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // Gang 10
|
||||||
|
};
|
||||||
|
|
||||||
Weapon();
|
Weapon();
|
||||||
~Weapon();
|
~Weapon();
|
||||||
|
|
||||||
|
12
src/pch.cpp
12
src/pch.cpp
@ -1,13 +1 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
|
|
||||||
std::string Globals::header_id = "";
|
|
||||||
ImVec2 Globals::menu_size = ImVec2(screen::GetScreenWidth() / 4, screen::GetScreenHeight() / 1.2);
|
|
||||||
ImVec2 Globals::screen_size = ImVec2(-1, -1);
|
|
||||||
bool Globals::show_menu = false;
|
|
||||||
bool Globals::init_done = false;
|
|
||||||
Renderer Globals::renderer = Render_Unknown;
|
|
||||||
void* Globals::device = nullptr;
|
|
||||||
bool Globals::game_init = false;
|
|
||||||
|
|
||||||
std::ofstream flog = std::ofstream("CheatMenu.log");
|
|
||||||
CJson config = CJson("config");
|
|
||||||
|
24
src/pch.h
24
src/pch.h
@ -58,7 +58,7 @@
|
|||||||
#include "imgui/imgui_impl_dx11.h"
|
#include "imgui/imgui_impl_dx11.h"
|
||||||
#include "imgui/imgui_impl_win32.h"
|
#include "imgui/imgui_impl_win32.h"
|
||||||
|
|
||||||
#include "Events.h"
|
#include "MoreEvents.h"
|
||||||
#include "Json.h"
|
#include "Json.h"
|
||||||
#include "VKeys.h"
|
#include "VKeys.h"
|
||||||
#include "VehExtender.h"
|
#include "VehExtender.h"
|
||||||
@ -77,16 +77,19 @@ enum Renderer
|
|||||||
|
|
||||||
struct Globals
|
struct Globals
|
||||||
{
|
{
|
||||||
static std::string header_id;
|
inline static std::string header_id = "";
|
||||||
static ImVec2 menu_size;
|
inline static ImVec2 menu_size = ImVec2(screen::GetScreenWidth() / 4, screen::GetScreenHeight() / 1.2);
|
||||||
static ImVec2 screen_size;
|
inline static ImVec2 screen_size = ImVec2(-1, -1);
|
||||||
static bool show_menu;
|
inline static bool show_menu = false;
|
||||||
static bool init_done;
|
inline static bool init_done = false;
|
||||||
static bool game_init;
|
inline static bool game_init = false;
|
||||||
static Renderer renderer;
|
inline static Renderer renderer = Render_Unknown;
|
||||||
static void* device;
|
inline static void* device = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline static std::ofstream flog = std::ofstream("CheatMenu.log");
|
||||||
|
inline static CJson config = CJson("config");
|
||||||
|
|
||||||
struct TextureStructure
|
struct TextureStructure
|
||||||
{
|
{
|
||||||
std::string file_name;
|
std::string file_name;
|
||||||
@ -100,6 +103,3 @@ struct HotKeyData
|
|||||||
int key2;
|
int key2;
|
||||||
bool is_down = false;
|
bool is_down = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CJson config;
|
|
||||||
extern std::ofstream flog;
|
|
Loading…
Reference in New Issue
Block a user