Fix bugs with compile & enter nearest car (vc)

This commit is contained in:
Grinch_ 2021-09-23 12:56:23 +06:00
parent 01cfd73204
commit e3e9cd6a25
5 changed files with 61 additions and 42 deletions

View File

@ -6,10 +6,10 @@
"${workspaceFolder}/**", "${workspaceFolder}/**",
"${PLUGIN_SDK_DIR}/*", "${PLUGIN_SDK_DIR}/*",
"${DIRECTX9_SDK_DIR}/Include/*", "${DIRECTX9_SDK_DIR}/Include/*",
"${PLUGIN_SDK_DIR}/plugin_sa/*", // "${PLUGIN_SDK_DIR}/plugin_sa/*",
"${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*", // "${PLUGIN_SDK_DIR}/plugin_sa/game_sa/*",
// "${PLUGIN_SDK_DIR}/plugin_vc/*", "${PLUGIN_SDK_DIR}/plugin_vc/*",
// "${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*", "${PLUGIN_SDK_DIR}/plugin_vc/game_vc/*",
"${PLUGIN_SDK_DIR}/shared/*", "${PLUGIN_SDK_DIR}/shared/*",
"${PLUGIN_SDK_DIR}/shared/game/*", "${PLUGIN_SDK_DIR}/shared/game/*",
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*", "C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt\\*",
@ -20,7 +20,7 @@
"IS_PLATFORM_WIN", "IS_PLATFORM_WIN",
"_CRT_SECURE_NO_WARNINGS", "_CRT_SECURE_NO_WARNINGS",
"_CRT_NON_CONFORMING_SWPRINTFS", "_CRT_NON_CONFORMING_SWPRINTFS",
"GTASA", "GTAVC",
"_DX9_SDK_INSTALLED", "_DX9_SDK_INSTALLED",
"PLUGIN_SGV_10US" "PLUGIN_SGV_10US"
], ],

View File

@ -2,5 +2,5 @@
#define MENU_NAME "Cheat Menu" #define MENU_NAME "Cheat Menu"
#define MENU_VERSION_NUMBER "3.0" #define MENU_VERSION_NUMBER "3.0"
#define MENU_VERSION MENU_VERSION_NUMBER"-beta" #define MENU_VERSION MENU_VERSION_NUMBER"-beta"
#define BUILD_NUMBER "20210922" #define BUILD_NUMBER "20210923"
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")" #define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"

View File

@ -150,7 +150,7 @@ CPlayerPed* player = FindPlayerPed();
CVector pos = pVeh->GetPosition(); CVector pos = pVeh->GetPosition();
float dist = DistanceBetweenPoints(playerPos, pos); float dist = DistanceBetweenPoints(playerPos, pos);
if (dist < distance && pVeh->m_pDriver != player) if (dist < distance)
{ {
pClosestVeh = pVeh; pClosestVeh = pVeh;
distance = dist; distance = dist;

View File

@ -749,6 +749,7 @@ void Vehicle::Draw()
Command<Commands::WARP_CHAR_INTO_CAR>(hplayer, pClosestVeh); Command<Commands::WARP_CHAR_INTO_CAR>(hplayer, pClosestVeh);
} }
#ifdef GTASA
for (int i = 0; i < seats; ++i) for (int i = 0; i < seats; ++i)
{ {
if (i % 2 != 1) if (i % 2 != 1)
@ -759,9 +760,24 @@ void Vehicle::Draw()
if (ImGui::Button((std::string("Passenger ") + std::to_string(i + 1)).c_str(), if (ImGui::Button((std::string("Passenger ") + std::to_string(i + 1)).c_str(),
ImVec2(Ui::GetSize(2)))) ImVec2(Ui::GetSize(2))))
{ {
Command<Commands::WARP_CHAR_INTO_CAR_AS_PASSENGER>(hplayer, pClosestVeh, i); Command<Commands::WARP_CHAR_INTO_CAR_AS_PASSENGER>(hplayer, pClosestVeh, i);
} }
} }
#elif GTAVC
// ImGui::SameLine();
// if (ImGui::Button("Passenger", ImVec2(Ui::GetSize(2))))
// {
// if (pPlayer->m_bInVehicle)
// {
// CVector pos = pClosestVeh->GetPosition();
// Command<Commands::WARP_CHAR_FROM_CAR_TO_COORD>(hplayer, pos.x, pos.y, pos.z);
// }
// pPlayer->SetObjective(OBJECTIVE_ENTER_CAR_AS_PASSENGER);
// pPlayer->WarpPedIntoCar(pClosestVeh);
// // Command<Commands::SET_CAR_FORWARD_SPEED>(CPools::GetVehicleRef(pClosestVeh), 0);
// }
#endif
} }
else else
{ {

View File

@ -53,42 +53,45 @@ project "CheatMenuVC"
targetextension ".asi" targetextension ".asi"
files { files {
"../src/CheatMenu.h", "../src/cheatmenu.h",
"../src/CheatMenu.cpp", "../src/cheatmenu.cpp",
"../src/pch.h", "../src/pch.h",
"../src/pch.cpp", "../src/pch.cpp",
"../src/Hook.h", "../src/hook.h",
"../src/Hook.cpp", "../src/hook.cpp",
"../src/Updater.h", "../src/updater.h",
"../src/Updater.cpp", "../src/updater.cpp",
"../src/Json.h", "../src/json.h",
"../src/Json.cpp", "../src/json.cpp",
"../src/Animation.h", "../src/animation.h",
"../src/Animation.cpp", "../src/animation.cpp",
"../src/Teleport.h", "../src/teleport.h",
"../src/Teleport.cpp", "../src/teleport.cpp",
"../src/Player.h", "../src/player.h",
"../src/Player.cpp", "../src/player.cpp",
"../src/Ped.h", "../src/ped.h",
"../src/Ped.cpp", "../src/ped.cpp",
"../src/Ui.h", "../src/ui.h",
"../src/Ui.cpp", "../src/ui.cpp",
"../src/Vehicle.h", "../src/vehicle.h",
"../src/Vehicle.cpp", "../src/vehicle.cpp",
"../src/Util.h", "../src/util.h",
"../src/Util.cpp", "../src/util.cpp",
"../src/Menu.h", "../src/menu.h",
"../src/Menu.cpp", "../src/menu.cpp",
"../src/Weapon.h", "../src/weapon.h",
"../src/Weapon.cpp", "../src/weapon.cpp",
"../src/Game.h", "../src/game.h",
"../src/Game.cpp", "../src/game.cpp",
"../src/Visual.h", "../src/visual.h",
"../src/Visual.cpp", "../src/visual.cpp",
"../src/ResourceStore.h", "../src/resourcestore.h",
"../src/ResourceStore.cpp", "../src/resourcestore.cpp",
"../src/FileHandler.h", "../src/filehandler.h",
"../src/FileHandler.cpp" "../src/filehandler.cpp",
"../src/hotkeys.h",
"../src/hotkeys.cpp",
"../src/dllmain.cpp"
} }
includedirs { includedirs {
PSDK_DIR .. "/plugin_vc/", PSDK_DIR .. "/plugin_vc/",