Fix build issues with III & VC
This commit is contained in:
parent
58d395df02
commit
d0434379d3
@ -9,7 +9,7 @@
|
|||||||
#define MENU_NAME "Cheat Menu"
|
#define MENU_NAME "Cheat Menu"
|
||||||
#define MENU_VERSION_NUMBER "3.3"
|
#define MENU_VERSION_NUMBER "3.3"
|
||||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
||||||
#define BUILD_NUMBER "20220620"
|
#define BUILD_NUMBER "20220626"
|
||||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION
|
#define MENU_TITLE MENU_NAME " v" MENU_VERSION
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
24
src/game.cpp
24
src/game.cpp
@ -261,14 +261,14 @@ void Game::FreeCam()
|
|||||||
Command<Commands::CAMERA_PERSIST_FOV>(true);
|
Command<Commands::CAMERA_PERSIST_FOV>(true);
|
||||||
patch::Set<BYTE>(0xBA676C, 2); // disable radar
|
patch::Set<BYTE>(0xBA676C, 2); // disable radar
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
m_Freecam::m_pPed->m_nFlags.bIsVisible = false;
|
Freecam::m_pPed->m_nFlags.bIsVisible = false;
|
||||||
m_Freecam::m_pPed->m_nFlags.bUseCollision = false;
|
Freecam::m_pPed->m_nFlags.bUseCollision = false;
|
||||||
m_Freecam::m_pPed->SetPosition(playerPos);
|
Freecam::m_pPed->SetPosition(playerPos);
|
||||||
patch::Set<BYTE>(0xA10AB6, 1); // disable radar
|
patch::Set<BYTE>(0xA10AB6, 1); // disable radar
|
||||||
#else
|
#else
|
||||||
m_Freecam::m_pPed->m_nFlags.bIsVisible = false;
|
Freecam::m_pPed->m_nFlags.bIsVisible = false;
|
||||||
m_Freecam::m_pPed->m_nFlags.bUsesCollision = false;
|
Freecam::m_pPed->m_nFlags.bUsesCollision = false;
|
||||||
m_Freecam::m_pPed->SetPosition(playerPos.x, playerPos.y, playerPos.z);
|
Freecam::m_pPed->SetPosition(playerPos.x, playerPos.y, playerPos.z);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Freecam::m_bInitDone = true;
|
Freecam::m_bInitDone = true;
|
||||||
@ -379,11 +379,11 @@ void Game::FreeCam()
|
|||||||
Freecam::m_pPed->SetPosn(pos);
|
Freecam::m_pPed->SetPosn(pos);
|
||||||
CIplStore::AddIplsNeededAtPosn(pos);
|
CIplStore::AddIplsNeededAtPosn(pos);
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
m_Freecam::m_pPed->m_placement.SetHeading(m_Freecam::m_fTotalMouse.x);
|
Freecam::m_pPed->m_placement.SetHeading(Freecam::m_fTotalMouse.x);
|
||||||
m_Freecam::m_pPed->SetPosition(pos);
|
Freecam::m_pPed->SetPosition(pos);
|
||||||
#else
|
#else
|
||||||
m_Freecam::m_pPed->SetHeading(m_Freecam::m_fTotalMouse.x);
|
Freecam::m_pPed->SetHeading(Freecam::m_fTotalMouse.x);
|
||||||
m_Freecam::m_pPed->SetPosition(pos.x, pos.y, pos.z);
|
Freecam::m_pPed->SetPosition(pos.x, pos.y, pos.z);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ void Game::ShowPage()
|
|||||||
HardMode::m_fBacMaxHealth = CStats::GetStatValue(STAT_MAX_HEALTH);
|
HardMode::m_fBacMaxHealth = CStats::GetStatValue(STAT_MAX_HEALTH);
|
||||||
HardMode::m_fBacStamina = CStats::GetStatValue(STAT_STAMINA);
|
HardMode::m_fBacStamina = CStats::GetStatValue(STAT_STAMINA);
|
||||||
#else
|
#else
|
||||||
m_HardMode::m_fBacMaxHealth = 100.0f;
|
HardMode::m_fBacMaxHealth = 100.0f;
|
||||||
#endif
|
#endif
|
||||||
player->m_fHealth = 50.0f;
|
player->m_fHealth = 50.0f;
|
||||||
}
|
}
|
||||||
@ -781,7 +781,7 @@ void Game::ShowPage()
|
|||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
if (ImGui::BeginTabItem(TEXT("Game.Stats")))
|
if (ImGui::BeginTabItem(TEXT("Game.Stats")))
|
||||||
{
|
{
|
||||||
// similar to Ui::DrawJSON()
|
// similar to Ui::DrawList()
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
||||||
if (ImGui::Button(TEXT("Game.MaxWepSkills"), Ui::GetSize(2)))
|
if (ImGui::Button(TEXT("Game.MaxWepSkills"), Ui::GetSize(2)))
|
||||||
|
10
src/ped.cpp
10
src/ped.cpp
@ -137,7 +137,7 @@ void Ped::SpawnPed(std::string& cat, std::string& name, std::string& model)
|
|||||||
Command<Commands::LOAD_SPECIAL_CHARACTER>(currentSlot, model.c_str());
|
Command<Commands::LOAD_SPECIAL_CHARACTER>(currentSlot, model.c_str());
|
||||||
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
||||||
|
|
||||||
Command<Commands::CREATE_CHAR>(m_SpawnPed::m_nSelectedPedType + 4, 108+currentSlot, pos.x, pos.y, pos.z + 1, &hplayer);
|
Command<Commands::CREATE_CHAR>(SpawnPed::m_nSelectedPedType + 4, 108+currentSlot, pos.x, pos.y, pos.z + 1, &hplayer);
|
||||||
Command<Commands::UNLOAD_SPECIAL_CHARACTER>(currentSlot);
|
Command<Commands::UNLOAD_SPECIAL_CHARACTER>(currentSlot);
|
||||||
|
|
||||||
++currentSlot;
|
++currentSlot;
|
||||||
@ -365,7 +365,7 @@ void Ped::ShowPage()
|
|||||||
return m_PedData.m_pData->Get(str.c_str(), "Unknown");
|
return m_PedData.m_pData->Get(str.c_str(), "Unknown");
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
Ui::DrawJSON(m_PedData, SpawnPed, nullptr);
|
Ui::DrawList(m_PedData, SpawnPed, nullptr);
|
||||||
#endif
|
#endif
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
@ -416,11 +416,11 @@ void Ped::ShowPage()
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
Ui::DrawJSON(Weapon::m_WeaponData,
|
Ui::DrawList(Weapon::m_WeaponData,
|
||||||
[](std::string& root, std::string& key, std::string& id)
|
[](std::string& root, std::string& key, std::string& id)
|
||||||
{
|
{
|
||||||
m_SpawnPed::m_nWeaponId = std::stoi(id);
|
SpawnPed::m_nWeaponId = std::stoi(id);
|
||||||
m_SpawnPed::m_nWeaponName = key;
|
SpawnPed::m_nWeaponName = key;
|
||||||
},
|
},
|
||||||
nullptr);
|
nullptr);
|
||||||
#endif
|
#endif
|
||||||
|
@ -891,7 +891,7 @@ void Player::ShowPage()
|
|||||||
#else
|
#else
|
||||||
ImGui::TextWrapped(TEXT("Player.WorkSkinOnly"));
|
ImGui::TextWrapped(TEXT("Player.WorkSkinOnly"));
|
||||||
#endif
|
#endif
|
||||||
Ui::DrawJSON(skinData, ChangePlayerModel, nullptr);
|
Ui::DrawList(skinData, ChangePlayerModel, nullptr);
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,30 +40,30 @@ void Teleport::Init()
|
|||||||
|
|
||||||
Events::processScriptsEvent += []
|
Events::processScriptsEvent += []
|
||||||
{
|
{
|
||||||
if ((QuicKTP::m_bEnabled == true) && ((CTimer::m_snTimeInMilliseconds - QuicKTP::m_nTimer) > 500))
|
if ((QuickTP::m_bEnabled == true) && ((CTimer::m_snTimeInMilliseconds - QuickTP::m_nTimer) > 500))
|
||||||
{
|
{
|
||||||
CPlayerPed* player = FindPlayerPed();
|
CPlayerPed* player = FindPlayerPed();
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
CEntity* player_entity = FindPlayerEntity(-1);
|
CEntity* player_entity = FindPlayerEntity(-1);
|
||||||
QuicKTP::m_fPos.z = CWorld::FindGroundZFor3DCoord(QuicKTP::m_fPos.x, QuicKTP::m_fPos.y,
|
QuickTP::m_fPos.z = CWorld::FindGroundZFor3DCoord(QuickTP::m_fPos.x, QuickTP::m_fPos.y,
|
||||||
QuicKTP::m_fPos.z + 100.0f, nullptr, &player_entity) + 1.0f;
|
QuickTP::m_fPos.z + 100.0f, nullptr, &player_entity) + 1.0f;
|
||||||
#else
|
#else
|
||||||
m_Teleport::m_fPos.z = CWorld::FindGroundZFor3DCoord(m_Teleport::m_fPos.x, m_Teleport::m_fPos.y,
|
QuickTP::m_fPos.z = CWorld::FindGroundZFor3DCoord(QuickTP::m_fPos.x, QuickTP::m_fPos.y,
|
||||||
m_Teleport::m_fPos.z + 100.0f, nullptr) + 1.0f;
|
QuickTP::m_fPos.z + 100.0f, nullptr) + 1.0f;
|
||||||
#endif
|
#endif
|
||||||
CVehicle* pVeh = player->m_pVehicle;
|
CVehicle* pVeh = player->m_pVehicle;
|
||||||
|
|
||||||
if (pVeh && BY_GAME(player->m_nPedFlags.bInVehicle, player->m_pVehicle, player->m_pVehicle))
|
if (pVeh && BY_GAME(player->m_nPedFlags.bInVehicle, player->m_pVehicle, player->m_pVehicle))
|
||||||
{
|
{
|
||||||
BY_GAME(pVeh->Teleport(QuicKTP::m_fPos, false), pVeh->Teleport(QuicKTP::m_fPos), player->Teleport(QuicKTP::m_fPos));
|
BY_GAME(pVeh->Teleport(QuickTP::m_fPos, false), pVeh->Teleport(QuickTP::m_fPos), player->Teleport(QuickTP::m_fPos));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BY_GAME(player->Teleport(QuicKTP::m_fPos, false), player->Teleport(QuicKTP::m_fPos), player->Teleport(QuicKTP::m_fPos));
|
BY_GAME(player->Teleport(QuickTP::m_fPos, false), player->Teleport(QuickTP::m_fPos), player->Teleport(QuickTP::m_fPos));
|
||||||
}
|
}
|
||||||
|
|
||||||
QuicKTP::m_bEnabled = false;
|
QuickTP::m_bEnabled = false;
|
||||||
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(player), false);
|
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(player), false);
|
||||||
Command<Commands::RESTORE_CAMERA_JUMPCUT>();
|
Command<Commands::RESTORE_CAMERA_JUMPCUT>();
|
||||||
TheCamera.Fade(0, 1);
|
TheCamera.Fade(0, 1);
|
||||||
@ -100,9 +100,9 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, int interior_id)
|
|||||||
pos = targetBlip.m_vecPos;
|
pos = targetBlip.m_vecPos;
|
||||||
pos.z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, 1000, nullptr, &pPlayerEntity) + 500.f;
|
pos.z = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, 1000, nullptr, &pPlayerEntity) + 500.f;
|
||||||
|
|
||||||
QuicKTP::m_fPos = pos;
|
QuickTP::m_fPos = pos;
|
||||||
QuicKTP::m_nTimer = CTimer::m_snTimeInMilliseconds;
|
QuickTP::m_nTimer = CTimer::m_snTimeInMilliseconds;
|
||||||
QuicKTP::m_bEnabled = true;
|
QuickTP::m_bEnabled = true;
|
||||||
TheCamera.Fade(0, 0);
|
TheCamera.Fade(0, 0);
|
||||||
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(pPlayer), true);
|
Command<Commands::FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION>(CPools::GetPedRef(pPlayer), true);
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ private:
|
|||||||
static inline DataStore m_SpriteData {"sprites"};
|
static inline DataStore m_SpriteData {"sprites"};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct QuicKTP
|
struct QuickTP
|
||||||
{
|
{
|
||||||
static inline bool m_bEnabled;
|
static inline bool m_bEnabled;
|
||||||
static inline CVector m_fPos = { -1, -1, -1 };
|
static inline CVector m_fPos = { -1, -1, -1 };
|
||||||
|
@ -1073,7 +1073,7 @@ void Vehicle::ShowPage()
|
|||||||
return GetNameFromModel(std::stoi(str));
|
return GetNameFromModel(std::stoi(str));
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
Ui::DrawJSON(m_Spawner::m_VehData, SpawnVehicle, nullptr);
|
Ui::DrawList(Spawner::m_VehData, SpawnVehicle, nullptr);
|
||||||
#endif
|
#endif
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
@ -1118,9 +1118,9 @@ void Vehicle::ShowPage()
|
|||||||
ImGui::RadioButton(TEXT("Vehicle.Tertiary"), &PaintData::m_nRadioButton, 3);
|
ImGui::RadioButton(TEXT("Vehicle.Tertiary"), &PaintData::m_nRadioButton, 3);
|
||||||
ImGui::RadioButton(TEXT("Vehicle.Quaternary"), &PaintData::m_nRadioButton, 4);
|
ImGui::RadioButton(TEXT("Vehicle.Quaternary"), &PaintData::m_nRadioButton, 4);
|
||||||
#else
|
#else
|
||||||
ImGui::RadioButton(TEXT("Vehicle.Primary"), &m_PaintData::m_nRadioButton, 1);
|
ImGui::RadioButton(TEXT("Vehicle.Primary"), &PaintData::m_nRadioButton, 1);
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::RadioButton(TEXT("Vehicle.Secondary"), &m_PaintData::m_nRadioButton, 2);
|
ImGui::RadioButton(TEXT("Vehicle.Secondary"), &PaintData::m_nRadioButton, 2);
|
||||||
#endif
|
#endif
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::Columns(1);
|
ImGui::Columns(1);
|
||||||
|
@ -358,7 +358,7 @@ void Weapon::ShowPage()
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
#else
|
#else
|
||||||
Ui::DrawJSON(m_WeaponData, GiveWeaponToPlayer, nullptr);
|
Ui::DrawList(m_WeaponData, GiveWeaponToPlayer, nullptr);
|
||||||
#endif
|
#endif
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user