diff --git a/resource/VC/CheatMenu/json/ped.json b/resource/VC/CheatMenu/json/ped.json new file mode 100644 index 0000000..2e0d536 --- /dev/null +++ b/resource/VC/CheatMenu/json/ped.json @@ -0,0 +1,209 @@ +{ + "Common": + { + "Tommy" : "0", + "Swat" : "2", + "FBI" : "3", + "Army" : "4", + "Medic" : "5", + "Fireman" : "6", + "Male 1" : "7" + }, + "Misc" : + { + "HFYST" : "9", + "Bum 1" : "10", + "Greaser" : "11", + "HMOST" : "12", + "HFYRI" : "13", + "HFORI" : "14", + "HMYRI" : "15", + "HMORI" : "16", + "HFYBU" : "21", + "HFYMD" : "22", + "HFYCG" : "23", + "Bum 2" : "25", + "Bum 3" : "26", + "HMYAP" : "27", + "BMODK" : "29", + "Criminal 1" : "30", + "BFYST" : "31", + "BFOST" : "32", + "BMYST" : "33", + "BMOST" : "34", + "BFYRI" : "35", + "BFORI" : "36", + "BMYRI" : "37", + "BMYBU" : "42", + "Bum 4" : "44", + "Bum 5" : "45", + "BMYPI" : "46", + "BMYBB" : "47", + "Punk 1" : "48", + "WFOST" : "50", + "Punk 2" : "51", + "WMOST" : "52", + "WFYRI" : "53", + "WFORI" : "54", + "WMYRI" : "55", + "WMORI" : "56", + "Construction Worker" : "61", + "WFYBU" : "67", + "WMYBU" : "68", + "WMOBU" : "69", + "WFOTR" : "71", + "WMOTR" : "72", + "WMYPI" : "73", + "WMOCA" : "74", + "WFYJG" : "75", + "Skater Guy 1" : "76", + "Skater Guy 2" : "78", + "Young Woman Shopper" : "79", + "Old Woman Shopper" : "80", + "Tourist 1" : "81", + "Tourist 2" : "82" + }, + "Gangs" : + { + "Cuban 1" : "83", + "Cuban 2" : "84", + "Haitian 1" : "85", + "Haitian 2" : "86", + "Sharks 1" : "87", + "Sharks 2" : "88", + "Diaz 1" : "89", + "Patrol Invest Group 1" : "91", + "Patrol Invest Group 2" : "92", + "Biker 1" : "93", + "Biker 2" : "94", + "Vercetti 1" : "95", + "Vercetti 2" : "96" + }, + "Prostitute" : + { + "Prostitute 1" : "24", + "Prostitute 2" : "43", + "Prostitute 3" : "49", + "Prostitute 4" : "70", + "Prostitute 5" : "105", + "Prostitute 6" : "106" + }, + "Golfer" : + { + "Golfer 1" : "62", + "Golfer 2" : "63", + "Golfer 3" : "64" + }, + "Cop" : + { + "Default Cop" : "1", + "Undercover Cop 1" : "97", + "Undercover Cop 2" : "98", + "Undercover Cop 3" : "99", + "Undercover Cop 4" : "100", + "Undercover Cop 5" : "101", + "Undercover Cop 6" : "102", + "Undercover Cop 7" : "103", + "Undercover Cop 8" : "104" + }, + "Beach" : + { + "Beach Lady 1" : "17", + "Fat Beach Lady" : "18", + "Beach Guy 1" : "19", + "Fat Beach Guy" : "20", + "Beach Lady 2" : "38", + "Beach Guy 2" : "39", + "Beach Lady 3" : "40", + "Beach Guy 3" : "41", + "Beach Lady 4" : "57", + "Beach Guy 4" : "58", + "Beach Lady 5" : "59", + "Beach Guy 5" : "60", + "Beach Lady 6" : "65", + "Beach Guy 6" : "66", + "Beach Lady 7" : "77" + }, + "Driver" : + { + "Taxi Driver 1" : "28", + "Taxi Driver 2" : "74" + }, + "Special" : + { + "Bodyguard 1" : "BGA", + "Bodyguard 2" : "BGB", + "Malibu Club Bouncer" : "BOUNCA", + "Food Store Worker" : "BURGER", + "Cortez's Goon 1" : "CGONA", + "Cortez's Goon 2" : "CGONB", + "Cortez's Goon 3" : "CGONC", + "Chef" : "CHEF", + "Porn Cameraman" : "CMRAMAN", + "French courier" : "COURIER", + "Film Studio Worker 1" : "CREWA", + "Film Studio Worker 2" : "CREWB", + "Female porn actor" : "CSJUGGZ", + "Diaz's Goon 1" : "DGOONA", + "Diaz's Goon 2" : "DGOONB", + "Diaz's Goon 3" : "DGOONC", + "Floozy 1" : "FLOOZYA", + "Floozy 2" : "FLOOZYB", + "Floozy 3" : "FLOOZYC", + "French SWAT" : "FSFA", + "Alex Shrub" : "IGALSCB", + "Lance" : "IGBUDDY", + "Lance Cop" : "IGBUDY2", + "Lance Beaten" : "IGBUDY3", + "Candy Suxxx" : "IGCANDY", + "Colonel Juan Garcia Cortez" : "IGCOLON", + "Ricardo Diaz" : "IGDIAZ", + "Dick (Love Fist)" : "IGDICK", + "Gonzales" : "IGGONZ", + "Hilary King" : "IGHLARY", + "Hilary King Bank" : "IGHLRY2", + "Jezz Torrent (Love Fist)" : "IGJEZZ", + "Ken Rosenburg" : "IGKEN", + "Mercedes Cortez" : "IGMERC", + "Cam Jones" : "IGMIKE", + "Cam Jones Bank" : "IGMIKE2", + "Percy (Love Fist)" : "IGPERCY", + "Phil Cassidy" : "IGPHIL", + "Phil Cassidy (one armed)" : "IGPHIL2", + "Phil Cassidy Bank" : "IGPHIL3", + "Sonny Forelli" : "IGSONNY", + "Mercedes Cortez (dressed)" : "IGMERC2", + "Forelli Gang member 1" : "MBA", + "Forelli Gang member 2" : "MBB", + "Male Porn Actor" : "MPORNA", + "Mitch Baker's Goon 1" : "MGOONA", + "Mitch Baker's Goon 2" : "MSERVER", + "Tommy Tracksuit (black)" : "PLAY10", + "Tommy Tracksuit (red)" : "PLAY11", + "Tommy Frankie" : "PLAY12", + "Tommy Soiree" : "PLAYER2", + "Tommy Coveralls" : "PLAYER3", + "Tommy Country Club" : "PLAYER4", + "Tommy Havana" : "PLAYER5", + "Tommy Cop" : "PLAYER6", + "Tommy Bank Job" : "PLAYER7", + "Tommy Casual" : "PLAYER8", + "Tommy Buisness Suit" : "PLAYER9", + "Print Works Worker 1" : "PRINTRA", + "Print Works Worker 2" : "PRINTRB", + "Print Works Worker 3" : "PRINTRC", + "Psycho" : "PSYCHO", + "Hardware store Worker" : "S_KEEP", + "Ammu-Nation Worker" : "SAM", + "Street Wannabee thief" : "SGC", + "Sonny's Goon 1" : "SGOONA", + "Sonny's Goon 2" : "SGOONB", + "Shooting Range Ped 1" : "SHOOTRA", + "Shooting Range Ped 2" : "SHOOTRB", + "Spand Express Worker 1" : "SPANDXA", + "Spand Express Worker 2" : "SPANDXB", + "Stripper 1" : "STRIPA", + "Stripper 2" : "STRIPB", + "Stripper 3" : "STRIPC" + } +} \ No newline at end of file diff --git a/resource/VC/CheatMenu/json/peds.json b/resource/VC/CheatMenu/json/skins.json similarity index 100% rename from resource/VC/CheatMenu/json/peds.json rename to resource/VC/CheatMenu/json/skins.json diff --git a/src/Animation.cpp b/src/Animation.cpp index caacdde..3bee528 100644 --- a/src/Animation.cpp +++ b/src/Animation.cpp @@ -84,8 +84,7 @@ void Animation::Draw() if (ImGui::BeginChild("Anims Child")) { ImGui::Spacing(); - Ui::DrawJSON(m_AnimData.m_Json, m_AnimData.m_Categories, m_AnimData.m_Selected, m_AnimData.m_Filter, &PlayAnimation, - &RemoveAnimation); + Ui::DrawJSON(m_AnimData, PlayAnimation, RemoveAnimation); ImGui::EndChild(); } ImGui::EndTabItem(); @@ -153,8 +152,7 @@ void Animation::Draw() if (ImGui::BeginChild("Cutscene Child")) { ImGui::Spacing(); - Ui::DrawJSON(m_Cutscene::m_Data.m_Json, m_Cutscene::m_Data.m_Categories, m_Cutscene::m_Data.m_Selected, - m_Cutscene::m_Data.m_Filter, &PlayCutscene, nullptr); + Ui::DrawJSON(m_Cutscene::m_Data, PlayCutscene, nullptr); ImGui::EndChild(); } ImGui::EndTabItem(); diff --git a/src/CheatMenu.cpp b/src/CheatMenu.cpp index d63086d..a2b113a 100644 --- a/src/CheatMenu.cpp +++ b/src/CheatMenu.cpp @@ -9,11 +9,7 @@ void CheatMenu::DrawWindow() ImGuiIO& io = ImGui::GetIO(); static bool bRunning = true; -#ifdef GTASA - if (FrontEndMenuManager.m_bMenuActive) -#elif GTAVC - if (FrontendMenuManager.m_bMenuVisible) -#endif + if (BY_GAME(FrontEndMenuManager.m_bMenuActive, FrontendMenuManager.m_bMenuVisible)) { if (bRunning) { @@ -25,11 +21,7 @@ void CheatMenu::DrawWindow() else { bRunning = true; -#ifdef GTASA - if (Globals::m_bShowMenu || m_Commands::m_bShowMenu) -#elif GTAVC - if (Globals::m_bShowMenu) -#endif + if (Globals::m_bShowMenu || BY_GAME(m_Commands::m_bShowMenu, true)) { if (Globals::m_bShowMenu) { diff --git a/src/CheatMenu.h b/src/CheatMenu.h index 1afdc35..6732d9d 100644 --- a/src/CheatMenu.h +++ b/src/CheatMenu.h @@ -13,17 +13,17 @@ #include "Menu.h" #include "Teleport.h" #include "Player.h" +#include "Ped.h" #ifdef GTASA #include "Animation.h" #include "Game.h" -#include "Ped.h" #include "Vehicle.h" #include "Visual.h" #include "Weapon.h" class CheatMenu : Hook, Animation, Game, Menu, Ped, Player, Teleport, Vehicle, Visual, Weapon #elif defined(GTAVC) -class CheatMenu : Hook, Menu, Player, Teleport +class CheatMenu : Hook, Menu, Player, Ped, Teleport #endif { @@ -38,7 +38,8 @@ private: #elif GTAVC inline static CallbackTable header { - {"Teleport", &Teleport::Draw}, {"Player", &Player::Draw}, {"Menu", &Menu::Draw} + {"Teleport", &Teleport::Draw}, {"Player", &Player::Draw}, {"Ped", &Ped::Draw}, + {"Menu", &Menu::Draw} }; #endif diff --git a/src/Game.cpp b/src/Game.cpp index 21fdcc0..b2623e0 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -587,8 +587,7 @@ It's recommanded not to save after using the mission loader. Use it at your own ImGui::Spacing(); - Ui::DrawJSON(m_MissionData.m_Json, m_MissionData.m_Categories, m_MissionData.m_Selected, m_MissionData.m_Filter, - SetPlayerMission, nullptr); + Ui::DrawJSON(m_MissionData, SetPlayerMission, nullptr); } ImGui::EndTabItem(); } diff --git a/src/Ped.cpp b/src/Ped.cpp index fb88382..18bed14 100644 --- a/src/Ped.cpp +++ b/src/Ped.cpp @@ -2,11 +2,15 @@ #include "Ped.h" #include "Ui.h" #include "Util.h" +#include Ped::Ped() { +#ifdef GTASA if (GetModuleHandle("ExGangWars.asi")) + { m_bExGangWarsInstalled = true; + } Events::processScriptsEvent += [] { @@ -16,6 +20,9 @@ Ped::Ped() m_bImagesLoaded = true; } }; +#elif GTAVC + m_PedData.m_Json.LoadData(m_PedData.m_Categories, m_PedData.m_Selected); +#endif } Ped::~Ped() @@ -27,7 +34,11 @@ Ped::~Ped() } } +#ifdef GTASA void Ped::SpawnPed(std::string& model) +#elif GTAVC +void Ped::SpawnPed(std::string& cat, std::string& name, std::string& model) +#endif { if (m_SpawnPed::m_List.size() == SPAWN_PED_LIMIT) { @@ -35,7 +46,7 @@ void Ped::SpawnPed(std::string& model) return; } - if (m_PedData.m_Json.m_Data.contains(model)) + if (BY_GAME(m_PedData.m_Json.m_Data.contains(model), true)) { CPlayerPed* player = FindPlayerPed(); CVector pos = player->GetPosition(); @@ -44,6 +55,7 @@ void Ped::SpawnPed(std::string& model) CPed* ped; int hplayer; +#ifdef GTASA if (m_SpecialPedJson.m_Data.contains(model)) { std::string name; @@ -58,8 +70,27 @@ void Ped::SpawnPed(std::string& model) Command(m_SpawnPed::m_nSelectedPedType + 4, 291, pos.x, pos.y, pos.z + 1, &hplayer); CStreaming::SetSpecialCharIsDeletable(291); } - else +#elif GTAVC + + if (cat == "Special") // Special model { + static size_t currentSlot = 1; + + Command(currentSlot, model.c_str()); + Command(); + + Command(4, 108+currentSlot, pos.x, pos.y, pos.z + 1, &hplayer); + Command(currentSlot); + + ++currentSlot; + if (currentSlot > 21) + { + currentSlot = 1; + } + } +#endif + else + { int iModel = std::stoi(model); CStreaming::RequestModel(iModel, eStreamingFlags::PRIORITY_REQUEST); CStreaming::LoadAllRequestedModels(false); @@ -80,6 +111,7 @@ void Ped::SpawnPed(std::string& model) ped->m_nWeaponAccuracy = m_SpawnPed::m_nAccuracy; ped->m_fHealth = m_SpawnPed::m_nPedHealth; +#ifdef GTASA if (m_SpawnPed::m_nWeaponId != 0) { int model = 0; @@ -88,9 +120,11 @@ void Ped::SpawnPed(std::string& model) CStreaming::LoadAllRequestedModels(false); Command(hplayer, m_SpawnPed::m_nWeaponId, 999); } +#endif } } + void Ped::Draw() { if (ImGui::BeginTabBar("Ped", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll)) @@ -100,7 +134,7 @@ void Ped::Draw() ImGui::Spacing(); ImGui::BeginChild("CheckboxesChild"); ImGui::Columns(2, 0, false); - +#ifdef GTASA Ui::CheckboxAddress("Elvis everywhere", 0x969157); Ui::CheckboxAddress("Everyone is armed", 0x969140); Ui::CheckboxAddress("Gangs control streets", 0x96915B); @@ -113,7 +147,7 @@ void Ped::Draw() Ui::CheckboxAddress("Peds attack with rockets", 0x969158); Ui::CheckboxAddress("Peds riot", 0x969175); Ui::CheckboxAddress("Slut magnet", 0x96915D); - +#endif ImGui::Columns(1); ImGui::EndChild(); @@ -124,6 +158,7 @@ void Ped::Draw() ImGui::Spacing(); ImGui::BeginChild("MenusChild"); +#ifdef GTASA if (ImGui::CollapsingHeader("Gang wars")) { if (ImGui::Button("Start gang war", ImVec2(Ui::GetSize(2)))) @@ -175,9 +210,9 @@ void Ped::Draw() ImGui::Spacing(); ImGui::Separator(); } - - Ui::EditAddress("Pedestrian density multiplier", 0x8D2530, 0, 1, 10); - +#endif + Ui::EditReference("Pedestrian density multiplier", CPopulation::PedDensityMultiplier, 0, 1, 10); +#ifdef GTASA if (ImGui::CollapsingHeader("Recruit anyone")) { static std::vector selectWeapon{ @@ -187,6 +222,8 @@ void Ped::Draw() ImGui::Spacing(); ImGui::Separator(); } +#endif + if (ImGui::CollapsingHeader("Remove peds in radius")) { ImGui::InputInt("Radius", &m_nPedRemoveRadius); @@ -198,7 +235,9 @@ void Ped::Draw() { if (DistanceBetweenPoints(ped->GetPosition(), player->GetPosition()) < m_nPedRemoveRadius && ped->m_pVehicle == nullptr && ped != player) + { Command(CPools::GetPedRef(ped)); + } } } ImGui::Spacing(); @@ -227,10 +266,13 @@ void Ped::Draw() if (ImGui::BeginTabItem("Spawner")) { ImGui::Spacing(); - +#ifdef GTASA Ui::DrawImages(m_PedData.m_ImagesList, ImVec2(65, 110), m_PedData.m_Categories, m_PedData.m_Selected, m_PedData.m_Filter, SpawnPed, nullptr, [](std::string str) { return m_PedData.m_Json.m_Data[str].get(); }); +#elif GTAVC + Ui::DrawJSON(m_PedData, SpawnPed, nullptr); +#endif ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Config")) @@ -254,11 +296,12 @@ void Ped::Draw() m_SpawnPed::m_nPedHealth = 0; } Ui::ListBox("Ped type", m_SpawnPed::m_PedTypeList, m_SpawnPed::m_nSelectedPedType); - +#ifdef GTASA ImGui::Spacing(); ImGui::Text("Selected weapon: %s", Weapon::m_WeaponData.m_Json.m_Data[std::to_string(m_SpawnPed::m_nWeaponId)].get().c_str()); ImGui::Spacing(); + Ui::DrawImages(Weapon::m_WeaponData.m_ImagesList, ImVec2(65, 65), Weapon::m_WeaponData.m_Categories, Weapon::m_WeaponData.m_Selected, Weapon::m_WeaponData.m_Filter, [](std::string str) { m_SpawnPed::m_nWeaponId = std::stoi(str); }, @@ -269,7 +312,7 @@ void Ped::Draw() }, [](std::string str) { return str != "-1"; /*Jetpack*/ } ); - +#endif ImGui::Spacing(); ImGui::EndChild(); ImGui::EndTabItem(); diff --git a/src/Ped.h b/src/Ped.h index a453fd1..5371b38 100644 --- a/src/Ped.h +++ b/src/Ped.h @@ -1,12 +1,16 @@ #pragma once #include "Player.h" +#ifdef GTASA #include "Weapon.h" - +#endif class Ped { private: - inline static SSearchData m_PedData{"ped"}; +#ifdef GTASA inline static CJson m_SpecialPedJson = CJson("ped special"); +#endif + + inline static SSearchData m_PedData{"ped"}; inline static bool m_bImagesLoaded; inline static bool m_bExGangWarsInstalled; inline static int m_nPedRemoveRadius = 5; @@ -33,10 +37,17 @@ private: }; friend class Player; +#ifdef GTASA friend class Weapon; +#endif public: Ped(); ~Ped(); static void Draw(); + +#ifdef GTASA static void SpawnPed(std::string& model); +#elif GTAVC + static void SpawnPed(std::string& cat, std::string& name, std::string& model); +#endif }; diff --git a/src/Player.cpp b/src/Player.cpp index 86af25a..79935c3 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -37,8 +37,6 @@ inline static void PlayerModelBrokenFix() if (pPlayer->m_nModelIndex == 0) Call<0x5A81E0>(0, pPlayer->m_pPlayerData->m_pPedClothesDesc, 0xBC1C78, false); } -#elif GTAVC -inline static SSearchData tempPedData{ "peds" }; #endif Player::Player() @@ -46,9 +44,8 @@ Player::Player() #ifdef GTASA // Fix player model being broken after rebuild patch::RedirectCall(0x5A834D, &PlayerModelBrokenFix); -#endif - m_bAimSkinChanger = config.GetValue("aim_skin_changer", false); +#endif // Custom skins setup if (GetModuleHandle("modloader.asi")) @@ -90,7 +87,7 @@ Player::Player() #ifdef GTASA Util::LoadTextureDirectory(m_ClothData, PLUGIN_PATH((char*)"CheatMenu\\clothes.txd"), true); #elif GTAVC - tempPedData.m_Json.LoadData(tempPedData.m_Categories, tempPedData.m_Selected); + skinData.m_Json.LoadData(skinData.m_Categories, skinData.m_Selected); #endif m_bImagesLoaded = true; @@ -672,7 +669,7 @@ Limitations:\n\ ImGui::Spacing(); ImGui::Text("Info"); Ui::ShowTooltip("Not all ped skins work. I've added the ones that works!"); - Ui::DrawJSON(tempPedData.m_Json, tempPedData.m_Categories, tempPedData.m_Selected, tempPedData.m_Filter, ChangePlayerModel, nullptr); + Ui::DrawJSON(skinData, ChangePlayerModel, nullptr); ImGui::EndTabItem(); } #endif diff --git a/src/Player.h b/src/Player.h index 73cf8d4..33fb86b 100644 --- a/src/Player.h +++ b/src/Player.h @@ -5,7 +5,6 @@ class Player { private: inline static bool m_bGodMode; - inline static bool m_bAimSkinChanger; inline static bool m_bImagesLoaded; inline static bool m_bModloaderInstalled; struct m_KeepPosition @@ -14,7 +13,8 @@ private: inline static CVector m_fPos; }; - #ifdef GTASA +#ifdef GTASA + inline static bool m_bAimSkinChanger; inline static int m_nUiBodyState; inline static SSearchData m_ClothData; struct m_CustomSkins @@ -23,19 +23,18 @@ private: inline static ImGuiTextFilter m_Filter; inline static std::vector m_List; }; - #endif +#elif GTAVC + inline static SSearchData skinData{ "skin" }; +#endif public: Player(); + static void Draw(); #ifdef GTASA static void ChangePlayerModel(std::string& model); + static void ChangePlayerCloth(std::string& model); #elif GTAVC static void ChangePlayerModel(std::string& cat, std::string& name, std::string& id); #endif - static void Draw(); - - #ifdef GTASA - static void ChangePlayerCloth(std::string& model); - #endif }; diff --git a/src/Teleport.cpp b/src/Teleport.cpp index 93446ce..f74ca2a 100644 --- a/src/Teleport.cpp +++ b/src/Teleport.cpp @@ -271,8 +271,7 @@ void Teleport::Draw() #endif ImGui::Spacing(); - Ui::DrawJSON(tp_data.m_Json, tp_data.m_Categories, tp_data.m_Selected, tp_data.m_Filter, &TeleportToLocation, - &RemoveTeleportEntry); + Ui::DrawJSON(tp_data, TeleportToLocation,RemoveTeleportEntry); ImGui::EndTabItem(); } diff --git a/src/Ui.cpp b/src/Ui.cpp index 6a33e26..6a80e4a 100644 --- a/src/Ui.cpp +++ b/src/Ui.cpp @@ -347,17 +347,16 @@ bool Ui::CheckboxBitFlag(const char* label, uint flag, const char* hint) return rtn; } -void Ui::DrawJSON(CJson& json, std::vector& combo_items, std::string& selected_item, - ImGuiTextFilter& filter, +void Ui::DrawJSON(SSearchData& data, std::function func_left_click, std::function func_right_click) { ImGui::PushItemWidth(ImGui::GetContentRegionAvailWidth() / 2 - 5); - ListBoxStr("##Categories", combo_items, selected_item); + ListBoxStr("##Categories", data.m_Categories, data.m_Selected); ImGui::SameLine(); - filter.Draw("##Filter"); - if (strlen(filter.InputBuf) == 0) + data.m_Filter.Draw("##Filter"); + if (strlen(data.m_Filter.InputBuf) == 0) { ImDrawList* drawlist = ImGui::GetWindowDrawList(); @@ -377,14 +376,14 @@ void Ui::DrawJSON(CJson& json, std::vector& combo_items, std::strin ImGui::BeginChild(1); - for (auto root : json.m_Data.items()) + for (auto root : data.m_Json.m_Data.items()) { - if (root.key() == selected_item || selected_item == "All") + if (root.key() == data.m_Selected || data.m_Selected == "All") { for (auto _data : root.value().items()) { std::string name = _data.key(); - if (filter.PassFilter(name.c_str())) + if (data.m_Filter.PassFilter(name.c_str())) { if (ImGui::MenuItem(name.c_str()) && func_left_click != nullptr) { diff --git a/src/Ui.h b/src/Ui.h index c25229a..aa8444f 100644 --- a/src/Ui.h +++ b/src/Ui.h @@ -48,8 +48,7 @@ public: static bool CheckboxWithHint(const char* label, bool* state, const char* hint = nullptr, bool is_disabled = false); static void DrawHeaders(CallbackTable& data); - static void DrawJSON(CJson& json, std::vector& combo_items, std::string& selected_item, - ImGuiTextFilter& filter, + static void DrawJSON(SSearchData& data, std::function func_left_click, std::function func_right_click); static void DrawImages(std::vector>& img_vec, ImVec2 image_size, diff --git a/src/Weapon.h b/src/Weapon.h index f711843..9e7682e 100644 --- a/src/Weapon.h +++ b/src/Weapon.h @@ -17,6 +17,8 @@ public: inline static uchar m_nCurrentWeaponSlot = -1; inline static int m_nSelectedGang; inline static int m_nSelectedWeapon; + +#ifdef GTASA inline static int m_nGangWeaponList[10][3] = { {WEAPON_PISTOL, WEAPON_MICRO_UZI, WEAPON_UNARMED}, // Ballas @@ -30,6 +32,7 @@ public: {WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // Gang 9 {WEAPON_UNARMED, WEAPON_UNARMED, WEAPON_UNARMED}, // Gang 10 }; +#endif Weapon(); diff --git a/tools/premake5.lua b/tools/premake5.lua index 08a460c..109b378 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -67,6 +67,8 @@ project "CheatMenuVC" "../src/Teleport.cpp", "../src/Player.h", "../src/Player.cpp", + "../src/Ped.h", + "../src/Ped.cpp", "../src/Ui.h", "../src/Ui.cpp", "../src/Util.h",