Rename plugin sdk stuff, add more translations
This commit is contained in:
parent
b4263e7a1f
commit
4d8af7de0d
@ -119,8 +119,11 @@
|
|||||||
"CopyrightDisclaimer": "Copyright Grinch_ 2019-2022. All rights reserved.",
|
"CopyrightDisclaimer": "Copyright Grinch_ 2019-2022. All rights reserved.",
|
||||||
"CPUUsage": "CPU usage: %.2f%%",
|
"CPUUsage": "CPU usage: %.2f%%",
|
||||||
"Credits": "Credits",
|
"Credits": "Credits",
|
||||||
|
"CurrentVersion" : "Current version",
|
||||||
"DiscordRPC": "Discord rich presence",
|
"DiscordRPC": "Discord rich presence",
|
||||||
"DiscordServer": "Discord server",
|
"DiscordServer": "Discord server",
|
||||||
|
"DownloadPage" : "Download page",
|
||||||
|
"EnsureLatest" : "Please ensure you have the latest version from GitHub.",
|
||||||
"FixVehKey": "Fix current vehicle",
|
"FixVehKey": "Fix current vehicle",
|
||||||
"FlipVehKey": "Flip current vehicle",
|
"FlipVehKey": "Flip current vehicle",
|
||||||
"Frames": "Frames: %d",
|
"Frames": "Frames: %d",
|
||||||
@ -133,8 +136,10 @@
|
|||||||
"InvalidValue": "Invalid value",
|
"InvalidValue": "Invalid value",
|
||||||
"Language": "Language",
|
"Language": "Language",
|
||||||
"LanguageChangeFailed": "Failed to change language!",
|
"LanguageChangeFailed": "Failed to change language!",
|
||||||
|
"LatestVersion" : "Latest version",
|
||||||
"Location": "Location: %s",
|
"Location": "Location: %s",
|
||||||
"Name": "Name",
|
"Name": "Name",
|
||||||
|
"NewVersion" : "A new version of the menu is available.",
|
||||||
"NoBG": "No background",
|
"NoBG": "No background",
|
||||||
"OpenCMDKey": "Open/ close command window",
|
"OpenCMDKey": "Open/ close command window",
|
||||||
"OpenCMDUsing": "Open or close command window using %s",
|
"OpenCMDUsing": "Open or close command window using %s",
|
||||||
@ -168,6 +173,8 @@
|
|||||||
"TeleportCMDText": "Teleports player to specified coordinates.\nExample: tp x y z",
|
"TeleportCMDText": "Teleports player to specified coordinates.\nExample: tp x y z",
|
||||||
"TextColor": "Text color",
|
"TextColor": "Text color",
|
||||||
"Usage": "Usage",
|
"Usage": "Usage",
|
||||||
|
"UpdaterInfo1": "It's highly recommanded to update to the latest version. Newer version contains new features and bug fixes.",
|
||||||
|
"UpdaterInfo2": "To know what changes are made or to download, click on the 'Download page' button. Follow the instructions there. If you're still having issues, let me know on discord.",
|
||||||
"UsageText": "Left-click selects hotkey.\nLeft clicking outside deselects.\nRight click disables hotkey.",
|
"UsageText": "Left-click selects hotkey.\nLeft clicking outside deselects.\nRight click disables hotkey.",
|
||||||
"VehEngineKey": "Toggle vehicle engine",
|
"VehEngineKey": "Toggle vehicle engine",
|
||||||
"VehHealth": "Veh Health: %.f",
|
"VehHealth": "Veh Health: %.f",
|
||||||
@ -176,7 +183,8 @@
|
|||||||
"VehStartKey": "Vehicle instant start",
|
"VehStartKey": "Vehicle instant start",
|
||||||
"VehStopKey": "Vehicle instant start",
|
"VehStopKey": "Vehicle instant start",
|
||||||
"Version": "Version",
|
"Version": "Version",
|
||||||
"WeaponSpawned": "Weapon spawned"
|
"WeaponSpawned": "Weapon spawned",
|
||||||
|
"WelcomeMSG": "Welcome to Cheat Menu"
|
||||||
},
|
},
|
||||||
"Ped": {
|
"Ped": {
|
||||||
"Accuracy": "Accuracy",
|
"Accuracy": "Accuracy",
|
||||||
|
@ -22,7 +22,7 @@ void CheatMenu::DrawWindow()
|
|||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
static bool bRunning = true;
|
static bool bRunning = true;
|
||||||
|
|
||||||
if (BY_GAME(FrontEndMenuManager.m_bMenuActive, FrontendMenuManager.m_bMenuVisible, FrontEndMenuManager.m_bMenuActive))
|
if (FrontEndMenuManager.m_bMenuActive)
|
||||||
{
|
{
|
||||||
if (bRunning)
|
if (bRunning)
|
||||||
{
|
{
|
||||||
@ -223,7 +223,7 @@ void CheatMenu::Init()
|
|||||||
|
|
||||||
Events::processScriptsEvent += []()
|
Events::processScriptsEvent += []()
|
||||||
{
|
{
|
||||||
if (!BY_GAME(FrontEndMenuManager.m_bMenuActive, FrontendMenuManager.m_bMenuVisible, FrontEndMenuManager.m_bMenuActive))
|
if (!FrontEndMenuManager.m_bMenuActive)
|
||||||
{
|
{
|
||||||
if (menuOpen.Pressed())
|
if (menuOpen.Pressed())
|
||||||
{
|
{
|
||||||
@ -310,14 +310,12 @@ void CheatMenu::ShowAnniversaryPage()
|
|||||||
ImGui::TextWrapped("Feel free to star the GitHub repo or join the discord server and provide feedback, ideas, or suggestions.");
|
ImGui::TextWrapped("Feel free to star the GitHub repo or join the discord server and provide feedback, ideas, or suggestions.");
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
|
|
||||||
if (ImGui::Button("Discord server", ImVec2(Ui::GetSize(2))))
|
if (ImGui::Button(TEXT("Menu.DiscordServer"), ImVec2(Ui::GetSize(3))))
|
||||||
{
|
{
|
||||||
ShellExecute(nullptr, "open", DISCORD_INVITE, nullptr, nullptr, SW_SHOWNORMAL);
|
ShellExecute(nullptr, "open", DISCORD_INVITE, nullptr, nullptr, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(TEXT("Menu.GitHubRepo"), ImVec2(Ui::GetSize(3))))
|
||||||
if (ImGui::Button("GitHub repo", ImVec2(Ui::GetSize(2))))
|
|
||||||
{
|
{
|
||||||
ShellExecute(nullptr, "open", GITHUB_LINK, nullptr, nullptr, SW_SHOWNORMAL);
|
ShellExecute(nullptr, "open", GITHUB_LINK, nullptr, nullptr, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
@ -332,51 +330,48 @@ void CheatMenu::ShowWelcomePage()
|
|||||||
{
|
{
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
|
|
||||||
Ui::CenterdText("Welcome to Cheat Menu");
|
Ui::CenterdText(TEXT("Menu.WelcomeMSG"));
|
||||||
Ui::CenterdText("Author: Grinch_");
|
Ui::CenterdText(std::format("{}: Grinch_",TEXT("Menu.Author")));
|
||||||
|
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
ImGui::TextWrapped("Please ensure you have the latest version from GitHub.");
|
ImGui::TextWrapped(TEXT("Menu.EnsureLatest"));
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
if (ImGui::Button("Discord server", ImVec2(Ui::GetSize(2))))
|
if (ImGui::Button(TEXT("Menu.DiscordServer"), ImVec2(Ui::GetSize(2))))
|
||||||
{
|
{
|
||||||
ShellExecute(nullptr, "open", DISCORD_INVITE, nullptr, nullptr, SW_SHOWNORMAL);
|
ShellExecute(nullptr, "open", DISCORD_INVITE, nullptr, nullptr, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button(TEXT("Menu.GitHubRepo"), ImVec2(Ui::GetSize(2))))
|
||||||
if (ImGui::Button("GitHub repo", ImVec2(Ui::GetSize(2))))
|
|
||||||
{
|
{
|
||||||
ShellExecute(nullptr, "open", GITHUB_LINK, nullptr, nullptr, SW_SHOWNORMAL);
|
ShellExecute(nullptr, "open", GITHUB_LINK, nullptr, nullptr, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
ImGui::TextWrapped("If you find bugs or have suggestions, you can let me know on discord :)");
|
ImGui::TextWrapped(TEXT("Menu.BugDisclaimer"));
|
||||||
ImGui::Dummy(ImVec2(0, 30));
|
ImGui::Dummy(ImVec2(0, 30));
|
||||||
Ui::CenterdText("Copyright Grinch_ 2019-2022. All rights reserved.");
|
Ui::CenterdText(TEXT("Menu.CopyrightDisclaimer"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheatMenu::ShowUpdatePage()
|
void CheatMenu::ShowUpdatePage()
|
||||||
{
|
{
|
||||||
std::string ver = Updater::GetUpdateVersion();
|
std::string ver = Updater::GetUpdateVersion();
|
||||||
ImGui::Dummy(ImVec2(0, 20));
|
ImGui::Dummy(ImVec2(0, 20));
|
||||||
Ui::CenterdText("A new version of the menu is available.");
|
Ui::CenterdText(TEXT("Menu.NewVersion"));
|
||||||
Ui::CenterdText(std::string("Current version: ") + MENU_VERSION);
|
Ui::CenterdText(std::format("{}: {}", TEXT("Menu.CurrentVersion"), MENU_VERSION));
|
||||||
Ui::CenterdText("Latest version: " + ver);
|
Ui::CenterdText(TEXT("Menu.LatestVersion") + ver);
|
||||||
ImGui::Dummy(ImVec2(0, 10));
|
ImGui::Dummy(ImVec2(0, 10));
|
||||||
ImGui::TextWrapped("It's highly recommanded to update to the latest version."
|
ImGui::TextWrapped(TEXT("Menu.UpdaterInfo1"));
|
||||||
" Newer versions may contain new features and bug fixes.");
|
|
||||||
ImGui::Dummy(ImVec2(0, 10));
|
ImGui::Dummy(ImVec2(0, 10));
|
||||||
ImGui::TextWrapped("To know what changes are made or to download, click on the 'Download page' button."
|
ImGui::TextWrapped(TEXT("Menu.UpdaterInfo2"));
|
||||||
" Follow the instructions there. If you're still having issues, let me know on discord.");
|
|
||||||
|
|
||||||
ImGui::Dummy(ImVec2(0, 5));
|
ImGui::Dummy(ImVec2(0, 5));
|
||||||
if (ImGui::Button("Discord server", ImVec2(Ui::GetSize(2))))
|
if (ImGui::Button(TEXT("Menu.DiscordServer"), ImVec2(Ui::GetSize(2))))
|
||||||
ShellExecute(NULL, "open", DISCORD_INVITE, NULL, NULL, SW_SHOWNORMAL);
|
{
|
||||||
|
ShellExecute(nullptr, "open", DISCORD_INVITE, nullptr, nullptr, SW_SHOWNORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
if (ImGui::Button("Download page", Ui::GetSize(2)))
|
if (ImGui::Button(TEXT("Menu.DownloadPage"), Ui::GetSize(2)))
|
||||||
{
|
{
|
||||||
ShellExecute(NULL, "open", std::string("https://github.com/user-grinch/Cheat-Menu/releases/tag/" +
|
ShellExecute(NULL, "open", std::string("https://github.com/user-grinch/Cheat-Menu/releases/tag/" +
|
||||||
ver).c_str(), NULL, NULL, SW_SHOWNORMAL);
|
ver).c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||||
|
@ -188,7 +188,7 @@ void D3dHook::ProcessMouse()
|
|||||||
{
|
{
|
||||||
bMouseDisabled = true;
|
bMouseDisabled = true;
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
pad->m_bDisablePlayerControls = true;
|
pad->DisablePlayerControls = true;
|
||||||
#else
|
#else
|
||||||
pad->DisablePlayerControls = true;
|
pad->DisablePlayerControls = true;
|
||||||
#endif
|
#endif
|
||||||
@ -197,7 +197,7 @@ void D3dHook::ProcessMouse()
|
|||||||
{
|
{
|
||||||
bMouseDisabled = false;
|
bMouseDisabled = false;
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
pad->m_bDisablePlayerControls = false;
|
pad->DisablePlayerControls = false;
|
||||||
#else
|
#else
|
||||||
pad->DisablePlayerControls = false;
|
pad->DisablePlayerControls = false;
|
||||||
#endif
|
#endif
|
||||||
@ -229,8 +229,8 @@ void D3dHook::ProcessMouse()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CPad::NewMouseControllerState.X = 0;
|
CPad::NewMouseControllerState.x = 0;
|
||||||
CPad::NewMouseControllerState.Y = 0;
|
CPad::NewMouseControllerState.y = 0;
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
CPad::GetPad(0)->ClearMouseHistory();
|
CPad::GetPad(0)->ClearMouseHistory();
|
||||||
#else
|
#else
|
||||||
|
@ -12,7 +12,8 @@ void MenuThread(void* param)
|
|||||||
Doing it like this doesn't prevent from attaching a debugger
|
Doing it like this doesn't prevent from attaching a debugger
|
||||||
*/
|
*/
|
||||||
static bool gameStarted = false;
|
static bool gameStarted = false;
|
||||||
Events::processScriptsEvent +=[]{
|
Events::processScriptsEvent +=[]
|
||||||
|
{
|
||||||
gameStarted = true;
|
gameStarted = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -108,8 +109,8 @@ BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gLog << "Error: Unknown game version. GTA " << BY_GAME("SA v1.0 US Hoodlum", "VC v1.0 EN", "III v1.0 EN") << " is required." << std::endl;
|
gLog << "Error: Unknown game version. GTA " << BY_GAME("SA v1.0 US Hoodlum or Compact", "VC v1.0 EN", "III v1.0 EN") << " is required." << std::endl;
|
||||||
MessageBox(HWND_DESKTOP, "Unknown game version. GTA " BY_GAME("SA v1.0 US Hoodlum", "VC v1.0 EN", "III v1.0 EN") " is required.", "CheatMenu", MB_ICONERROR);
|
MessageBox(HWND_DESKTOP, "Unknown game version. GTA " BY_GAME("SA v1.0 US Hoodlum or Compact", "VC v1.0 EN", "III v1.0 EN") " is required.", "CheatMenu", MB_ICONERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
28
src/game.cpp
28
src/game.cpp
@ -240,12 +240,7 @@ void Game::FreeCam()
|
|||||||
m_Freecam::m_bRadarState = patch::Get<BYTE>(BY_GAME(0xBA676C, 0xA10AB6, NULL)); // radar
|
m_Freecam::m_bRadarState = patch::Get<BYTE>(BY_GAME(0xBA676C, 0xA10AB6, NULL)); // radar
|
||||||
|
|
||||||
CVector playerPos = player->GetPosition();
|
CVector playerPos = player->GetPosition();
|
||||||
|
|
||||||
#ifdef GTA3
|
|
||||||
CPad::GetPad(0)->m_bDisablePlayerControls = true;
|
|
||||||
#else
|
|
||||||
CPad::GetPad(0)->DisablePlayerControls = true;
|
CPad::GetPad(0)->DisablePlayerControls = true;
|
||||||
#endif
|
|
||||||
|
|
||||||
Command<Commands::CREATE_RANDOM_CHAR>(playerPos.x, playerPos.y, playerPos.z, &m_Freecam::m_nPed);
|
Command<Commands::CREATE_RANDOM_CHAR>(playerPos.x, playerPos.y, playerPos.z, &m_Freecam::m_nPed);
|
||||||
m_Freecam::m_pPed = CPools::GetPed(m_Freecam::m_nPed);
|
m_Freecam::m_pPed = CPools::GetPed(m_Freecam::m_nPed);
|
||||||
@ -270,8 +265,8 @@ void Game::FreeCam()
|
|||||||
m_Freecam::m_pPed->SetPosition(playerPos);
|
m_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_nEntityFlags.bIsVisible = false;
|
m_Freecam::m_pPed->m_nFlags.bIsVisible = false;
|
||||||
m_Freecam::m_pPed->m_nEntityFlags.bUsesCollision = false;
|
m_Freecam::m_pPed->m_nFlags.bUsesCollision = false;
|
||||||
m_Freecam::m_pPed->SetPosition(playerPos.x, playerPos.y, playerPos.z);
|
m_Freecam::m_pPed->SetPosition(playerPos.x, playerPos.y, playerPos.z);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -280,8 +275,8 @@ void Game::FreeCam()
|
|||||||
|
|
||||||
CVector pos = m_Freecam::m_pPed->GetPosition();
|
CVector pos = m_Freecam::m_pPed->GetPosition();
|
||||||
|
|
||||||
m_Freecam::m_fMouse.x = CPad::NewMouseControllerState.X;
|
m_Freecam::m_fMouse.x = CPad::NewMouseControllerState.x;
|
||||||
m_Freecam::m_fMouse.y = CPad::NewMouseControllerState.Y;
|
m_Freecam::m_fMouse.y = CPad::NewMouseControllerState.y;
|
||||||
m_Freecam::m_fTotalMouse.x = m_Freecam::m_fTotalMouse.x - m_Freecam::m_fMouse.x / 250;
|
m_Freecam::m_fTotalMouse.x = m_Freecam::m_fTotalMouse.x - m_Freecam::m_fMouse.x / 250;
|
||||||
m_Freecam::m_fTotalMouse.y = m_Freecam::m_fTotalMouse.y + m_Freecam::m_fMouse.y / 3;
|
m_Freecam::m_fTotalMouse.y = m_Freecam::m_fTotalMouse.y + m_Freecam::m_fMouse.y / 3;
|
||||||
|
|
||||||
@ -398,11 +393,7 @@ void Game::ClearFreecamStuff()
|
|||||||
patch::Set<BYTE>(BY_GAME(0xBA6769, 0x86963A, NULL), m_Freecam::m_bHudState); // hud
|
patch::Set<BYTE>(BY_GAME(0xBA6769, 0x86963A, NULL), m_Freecam::m_bHudState); // hud
|
||||||
patch::Set<BYTE>(BY_GAME(0xBA676C, 0xA10AB6, NULL), m_Freecam::m_bRadarState); // radar
|
patch::Set<BYTE>(BY_GAME(0xBA676C, 0xA10AB6, NULL), m_Freecam::m_bRadarState); // radar
|
||||||
|
|
||||||
#ifdef GTA3
|
|
||||||
CPad::GetPad(0)->m_bDisablePlayerControls = false;
|
|
||||||
#else
|
|
||||||
CPad::GetPad(0)->DisablePlayerControls = false;
|
CPad::GetPad(0)->DisablePlayerControls = false;
|
||||||
#endif
|
|
||||||
|
|
||||||
Command<Commands::DELETE_CHAR>(m_Freecam::m_nPed);
|
Command<Commands::DELETE_CHAR>(m_Freecam::m_nPed);
|
||||||
m_Freecam::m_pPed = nullptr;
|
m_Freecam::m_pPed = nullptr;
|
||||||
@ -481,14 +472,7 @@ void Game::ShowPage()
|
|||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
if (Ui::CheckboxWithHint(TEXT("Game.ForbiddenWantedLevel"), &m_bForbiddenArea, TEXT("Game.ForbiddenWantedLevelText")))
|
if (Ui::CheckboxWithHint(TEXT("Game.ForbiddenWantedLevel"), &m_bForbiddenArea, TEXT("Game.ForbiddenWantedLevelText")))
|
||||||
{
|
{
|
||||||
if (m_bForbiddenArea)
|
patch::Set<BYTE>(0x441770, m_bForbiddenArea ? 0x83 : 0xC3, false);
|
||||||
{
|
|
||||||
patch::Set<BYTE>(0x441770, 0x83, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
patch::Set<BYTE>(0x441770, 0xC3, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Ui::CheckboxAddress(TEXT("Game.FreePNS"), 0x96C009);
|
Ui::CheckboxAddress(TEXT("Game.FreePNS"), 0x96C009);
|
||||||
#endif
|
#endif
|
||||||
@ -589,7 +573,7 @@ void Game::ShowPage()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
Ui::EditAddress<int>(TEXT("Game.DaysPassed"), BY_GAME(0xB79038, 0x97F1F4, 0x8F2BB8), 0, 9999);
|
Ui::EditAddress<int>(TEXT("Game.DaysPassed"), BY_GAME(0xB79038, 0x97F1F4, 0x8F2BB8), 0, 9999);
|
||||||
Ui::EditReference(TEXT("Game.FPSLimit"), BY_GAME(RsGlobal.frameLimit, RsGlobal.maxFPS, RsGlobal.maxFPS), 1, 30, 60);
|
Ui::EditReference(TEXT("Game.FPSLimit"), RsGlobal.frameLimit, 1, 30, 60);
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
if (ImGui::CollapsingHeader(TEXT("Game.Freecam")))
|
if (ImGui::CollapsingHeader(TEXT("Game.Freecam")))
|
||||||
{
|
{
|
||||||
|
@ -165,11 +165,7 @@ void Ped::SpawnPed(std::string& cat, std::string& name, std::string& model)
|
|||||||
Command<Commands::MARK_CHAR_AS_NO_LONGER_NEEDED>(hplayer);
|
Command<Commands::MARK_CHAR_AS_NO_LONGER_NEEDED>(hplayer);
|
||||||
}
|
}
|
||||||
ped->m_nPedFlags.bPedIsBleeding = m_SpawnPed::m_bPedBleed;
|
ped->m_nPedFlags.bPedIsBleeding = m_SpawnPed::m_bPedBleed;
|
||||||
#ifdef GTA3
|
|
||||||
ped->m_nWepAccuracy = m_SpawnPed::m_nAccuracy;
|
|
||||||
#else
|
|
||||||
ped->m_nWeaponAccuracy = m_SpawnPed::m_nAccuracy;
|
ped->m_nWeaponAccuracy = m_SpawnPed::m_nAccuracy;
|
||||||
#endif
|
|
||||||
ped->m_fHealth = m_SpawnPed::m_nPedHealth;
|
ped->m_fHealth = m_SpawnPed::m_nPedHealth;
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
if (m_SpawnPed::m_nWeaponId != 0)
|
if (m_SpawnPed::m_nWeaponId != 0)
|
||||||
|
@ -12,7 +12,9 @@ static inline void PlayerModelBrokenFix()
|
|||||||
CPlayerPed* pPlayer = FindPlayerPed();
|
CPlayerPed* pPlayer = FindPlayerPed();
|
||||||
|
|
||||||
if (pPlayer->m_nModelIndex == 0)
|
if (pPlayer->m_nModelIndex == 0)
|
||||||
|
{
|
||||||
Call<0x5A81E0>(0, pPlayer->m_pPlayerData->m_pPedClothesDesc, 0xBC1C78, false);
|
Call<0x5A81E0>(0, pPlayer->m_pPlayerData->m_pPedClothesDesc, 0xBC1C78, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -181,7 +183,7 @@ void Player::Init()
|
|||||||
player->m_nPhysicalFlags.bCollisionProof = 1;
|
player->m_nPhysicalFlags.bCollisionProof = 1;
|
||||||
player->m_nPhysicalFlags.bExplosionProof = 1;
|
player->m_nPhysicalFlags.bExplosionProof = 1;
|
||||||
player->m_nPhysicalFlags.bFireProof = 1;
|
player->m_nPhysicalFlags.bFireProof = 1;
|
||||||
player->m_nPhysicalFlags.bMeeleProof = 1;
|
player->m_nPhysicalFlags.bMeleeProof = 1;
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
player->m_nFlags.bBulletProof = 1;
|
player->m_nFlags.bBulletProof = 1;
|
||||||
player->m_nFlags.bCollisionProof = 1;
|
player->m_nFlags.bCollisionProof = 1;
|
||||||
@ -189,11 +191,11 @@ void Player::Init()
|
|||||||
player->m_nFlags.bFireProof = 1;
|
player->m_nFlags.bFireProof = 1;
|
||||||
player->m_nFlags.bMeleeProof = 1;
|
player->m_nFlags.bMeleeProof = 1;
|
||||||
#else
|
#else
|
||||||
player->m_nEntityFlags.bBulletProof = m_bGodMode;
|
player->m_nFlags.bBulletProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bCollisionProof = m_bGodMode;
|
player->m_nFlags.bCollisionProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bExplosionProof = m_bGodMode;
|
player->m_nFlags.bExplosionProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bFireProof = m_bGodMode;
|
player->m_nFlags.bFireProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bMeleeProof = m_bGodMode;
|
player->m_nFlags.bMeleeProof = m_bGodMode;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +232,7 @@ void Player::Init()
|
|||||||
player->m_nPhysicalFlags.bCollisionProof = 0;
|
player->m_nPhysicalFlags.bCollisionProof = 0;
|
||||||
player->m_nPhysicalFlags.bExplosionProof = 0;
|
player->m_nPhysicalFlags.bExplosionProof = 0;
|
||||||
player->m_nPhysicalFlags.bFireProof = 0;
|
player->m_nPhysicalFlags.bFireProof = 0;
|
||||||
player->m_nPhysicalFlags.bMeeleProof = 0;
|
player->m_nPhysicalFlags.bMeleeProof = 0;
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
player->m_nFlags.bBulletProof = 0;
|
player->m_nFlags.bBulletProof = 0;
|
||||||
player->m_nFlags.bCollisionProof = 0;
|
player->m_nFlags.bCollisionProof = 0;
|
||||||
@ -238,11 +240,11 @@ void Player::Init()
|
|||||||
player->m_nFlags.bFireProof = 0;
|
player->m_nFlags.bFireProof = 0;
|
||||||
player->m_nFlags.bMeleeProof = 0;
|
player->m_nFlags.bMeleeProof = 0;
|
||||||
#else
|
#else
|
||||||
player->m_nEntityFlags.bBulletProof = m_bGodMode;
|
player->m_nFlags.bBulletProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bCollisionProof = m_bGodMode;
|
player->m_nFlags.bCollisionProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bExplosionProof = m_bGodMode;
|
player->m_nFlags.bExplosionProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bFireProof = m_bGodMode;
|
player->m_nFlags.bFireProof = m_bGodMode;
|
||||||
player->m_nEntityFlags.bMeleeProof = m_bGodMode;
|
player->m_nFlags.bMeleeProof = m_bGodMode;
|
||||||
#endif
|
#endif
|
||||||
m_bGodMode = false;
|
m_bGodMode = false;
|
||||||
}
|
}
|
||||||
@ -417,8 +419,7 @@ void Player::ShowPage()
|
|||||||
}
|
}
|
||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
#endif
|
#endif
|
||||||
Ui::CheckboxAddress(TEXT("Player.FreeHealthcare"), BY_GAME((int)&pInfo->m_bFreeHealthCare,
|
Ui::CheckboxAddress(TEXT("Player.FreeHealthcare"), (int)&pInfo->m_bFreeHealthCare);
|
||||||
(int)&pInfo->m_bFreeHealthCare, (int)&pInfo->m_bGetOutOfHospitalFree));
|
|
||||||
|
|
||||||
if (Ui::CheckboxWithHint(TEXT("Player.FreezeWL"), &m_bFreezeWantedLevel))
|
if (Ui::CheckboxWithHint(TEXT("Player.FreezeWL"), &m_bFreezeWantedLevel))
|
||||||
{
|
{
|
||||||
@ -451,7 +452,7 @@ void Player::ShowPage()
|
|||||||
pPlayer->m_nPhysicalFlags.bCollisionProof = m_bGodMode;
|
pPlayer->m_nPhysicalFlags.bCollisionProof = m_bGodMode;
|
||||||
pPlayer->m_nPhysicalFlags.bExplosionProof = m_bGodMode;
|
pPlayer->m_nPhysicalFlags.bExplosionProof = m_bGodMode;
|
||||||
pPlayer->m_nPhysicalFlags.bFireProof = m_bGodMode;
|
pPlayer->m_nPhysicalFlags.bFireProof = m_bGodMode;
|
||||||
pPlayer->m_nPhysicalFlags.bMeeleProof = m_bGodMode;
|
pPlayer->m_nPhysicalFlags.bMeleeProof = m_bGodMode;
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
pPlayer->m_nFlags.bBulletProof = m_bGodMode;
|
pPlayer->m_nFlags.bBulletProof = m_bGodMode;
|
||||||
pPlayer->m_nFlags.bCollisionProof = m_bGodMode;
|
pPlayer->m_nFlags.bCollisionProof = m_bGodMode;
|
||||||
@ -459,11 +460,11 @@ void Player::ShowPage()
|
|||||||
pPlayer->m_nFlags.bFireProof = m_bGodMode;
|
pPlayer->m_nFlags.bFireProof = m_bGodMode;
|
||||||
pPlayer->m_nFlags.bMeleeProof = m_bGodMode;
|
pPlayer->m_nFlags.bMeleeProof = m_bGodMode;
|
||||||
#else
|
#else
|
||||||
pPlayer->m_nEntityFlags.bBulletProof = m_bGodMode;
|
pPlayer->m_nFlags.bBulletProof = m_bGodMode;
|
||||||
pPlayer->m_nEntityFlags.bCollisionProof = m_bGodMode;
|
pPlayer->m_nFlags.bCollisionProof = m_bGodMode;
|
||||||
pPlayer->m_nEntityFlags.bExplosionProof = m_bGodMode;
|
pPlayer->m_nFlags.bExplosionProof = m_bGodMode;
|
||||||
pPlayer->m_nEntityFlags.bFireProof = m_bGodMode;
|
pPlayer->m_nFlags.bFireProof = m_bGodMode;
|
||||||
pPlayer->m_nEntityFlags.bMeleeProof = m_bGodMode;
|
pPlayer->m_nFlags.bMeleeProof = m_bGodMode;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Ui::CheckboxWithHint(TEXT("Player.HealthRegen"), &m_bHealthRegen, TEXT("Player.HealthRegenTip"));
|
Ui::CheckboxWithHint(TEXT("Player.HealthRegen"), &m_bHealthRegen, TEXT("Player.HealthRegenTip"));
|
||||||
@ -472,11 +473,11 @@ void Player::ShowPage()
|
|||||||
Ui::CheckboxAddress(TEXT("Player.InfO2"), 0x96916E);
|
Ui::CheckboxAddress(TEXT("Player.InfO2"), 0x96916E);
|
||||||
if (Ui::CheckboxBitFlag(TEXT("Player.InvisPlayer"), pPlayer->m_nPedFlags.bDontRender))
|
if (Ui::CheckboxBitFlag(TEXT("Player.InvisPlayer"), pPlayer->m_nPedFlags.bDontRender))
|
||||||
{
|
{
|
||||||
pPlayer->m_nPedFlags.bDontRender = (pPlayer->m_nPedFlags.bDontRender == 1) ? 0 : 1;
|
pPlayer->m_nPedFlags.bDontRender != pPlayer->m_nPedFlags.bDontRender;
|
||||||
}
|
}
|
||||||
Ui::CheckboxAddress(TEXT("Player.InfSprint"), 0xB7CEE4);
|
Ui::CheckboxAddress(TEXT("Player.InfSprint"), 0xB7CEE4);
|
||||||
#else
|
#else
|
||||||
Ui::CheckboxAddress(TEXT("Player.InfSprint"), BY_GAME(NULL, (int)&pInfo->m_bNeverGetsTired, (int)&pInfo->m_bInfiniteSprint));
|
Ui::CheckboxAddress(TEXT("Player.InfSprint"), (int)&pInfo->m_bInfiniteSprint);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
@ -484,7 +485,7 @@ void Player::ShowPage()
|
|||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
if (Ui::CheckboxBitFlag(TEXT("Player.LockControl"), pad->bPlayerSafe))
|
if (Ui::CheckboxBitFlag(TEXT("Player.LockControl"), pad->bPlayerSafe))
|
||||||
{
|
{
|
||||||
pad->bPlayerSafe = (pad->bPlayerSafe == 1) ? 0 : 1;
|
pad->bPlayerSafe != pad->bPlayerSafe;
|
||||||
}
|
}
|
||||||
Ui::CheckboxAddressEx(TEXT("Player.MaxAppeal"), 0x969180, 1, 0);
|
Ui::CheckboxAddressEx(TEXT("Player.MaxAppeal"), 0x969180, 1, 0);
|
||||||
Ui::CheckboxAddress(TEXT("Player.MegaJump"), 0x96916C);
|
Ui::CheckboxAddress(TEXT("Player.MegaJump"), 0x96916C);
|
||||||
@ -551,45 +552,45 @@ void Player::ShowPage()
|
|||||||
ImGui::Columns(2, 0, false);
|
ImGui::Columns(2, 0, false);
|
||||||
|
|
||||||
bool state = BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof,
|
bool state = BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof,
|
||||||
pPlayer->m_nEntityFlags.bBulletProof);
|
pPlayer->m_nFlags.bBulletProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Player.BulletProof"), &state, nullptr, m_bGodMode))
|
if (Ui::CheckboxWithHint(TEXT("Player.BulletProof"), &state, nullptr, m_bGodMode))
|
||||||
{
|
{
|
||||||
BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof,
|
BY_GAME(pPlayer->m_nPhysicalFlags.bBulletProof, pPlayer->m_nFlags.bBulletProof,
|
||||||
pPlayer->m_nEntityFlags.bBulletProof) = state;
|
pPlayer->m_nFlags.bBulletProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof,
|
state = BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof,
|
||||||
pPlayer->m_nEntityFlags.bCollisionProof);
|
pPlayer->m_nFlags.bCollisionProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Player.CollisionProof"), &state, nullptr, m_bGodMode))
|
if (Ui::CheckboxWithHint(TEXT("Player.CollisionProof"), &state, nullptr, m_bGodMode))
|
||||||
{
|
{
|
||||||
BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof,
|
BY_GAME(pPlayer->m_nPhysicalFlags.bCollisionProof, pPlayer->m_nFlags.bCollisionProof,
|
||||||
pPlayer->m_nEntityFlags.bCollisionProof) = state;
|
pPlayer->m_nFlags.bCollisionProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof,
|
state = BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof,
|
||||||
pPlayer->m_nEntityFlags.bExplosionProof);
|
pPlayer->m_nFlags.bExplosionProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Player.ExplosionProof"), &state, nullptr, m_bGodMode))
|
if (Ui::CheckboxWithHint(TEXT("Player.ExplosionProof"), &state, nullptr, m_bGodMode))
|
||||||
{
|
{
|
||||||
BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof,
|
BY_GAME(pPlayer->m_nPhysicalFlags.bExplosionProof, pPlayer->m_nFlags.bExplosionProof,
|
||||||
pPlayer->m_nEntityFlags.bExplosionProof) = state;
|
pPlayer->m_nFlags.bExplosionProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
|
|
||||||
state = BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof,
|
state = BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof,
|
||||||
pPlayer->m_nEntityFlags.bFireProof);
|
pPlayer->m_nFlags.bFireProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Player.FireProof"), &state, nullptr, m_bGodMode))
|
if (Ui::CheckboxWithHint(TEXT("Player.FireProof"), &state, nullptr, m_bGodMode))
|
||||||
{
|
{
|
||||||
BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof,
|
BY_GAME(pPlayer->m_nPhysicalFlags.bFireProof, pPlayer->m_nFlags.bFireProof,
|
||||||
pPlayer->m_nEntityFlags.bFireProof) = state;
|
pPlayer->m_nFlags.bFireProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pPlayer->m_nPhysicalFlags.bMeeleProof, pPlayer->m_nFlags.bMeleeProof,
|
state = BY_GAME(pPlayer->m_nPhysicalFlags.bMeleeProof, pPlayer->m_nFlags.bMeleeProof,
|
||||||
pPlayer->m_nEntityFlags.bMeleeProof);
|
pPlayer->m_nFlags.bMeleeProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Player.MeeleProof"), &state, nullptr, m_bGodMode))
|
if (Ui::CheckboxWithHint(TEXT("Player.MeeleProof"), &state, nullptr, m_bGodMode))
|
||||||
{
|
{
|
||||||
BY_GAME(pPlayer->m_nPhysicalFlags.bMeeleProof, pPlayer->m_nFlags.bMeleeProof,
|
BY_GAME(pPlayer->m_nPhysicalFlags.bMeleeProof, pPlayer->m_nFlags.bMeleeProof,
|
||||||
pPlayer->m_nEntityFlags.bMeleeProof) = state;
|
pPlayer->m_nFlags.bMeleeProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
@ -882,7 +883,7 @@ void Player::ShowPage()
|
|||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
ImGui::TextWrapped(TEXT("Player.SkinChangeFrozen"));
|
ImGui::TextWrapped(TEXT("Player.SkinChangeFrozen"));
|
||||||
CPad::GetPad(0)->m_bDisablePlayerControls = true;
|
CPad::GetPad(0)->DisablePlayerControls = true;
|
||||||
#else
|
#else
|
||||||
ImGui::TextWrapped(TEXT("Player.WorkSkinOnly"));
|
ImGui::TextWrapped(TEXT("Player.WorkSkinOnly"));
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,7 +23,7 @@ void Teleport::FetchRadarSpriteData()
|
|||||||
m_tpData.m_pJson->m_Data.erase("Radar");
|
m_tpData.m_pJson->m_Data.erase("Radar");
|
||||||
for (int i = 0; i != maxSprites; ++i)
|
for (int i = 0; i != maxSprites; ++i)
|
||||||
{
|
{
|
||||||
CVector pos = CRadar::ms_RadarTrace[i].m_vPosition;
|
CVector pos = CRadar::ms_RadarTrace[i].m_vecPos;
|
||||||
uchar sprite = CRadar::ms_RadarTrace[i].m_nBlipSprite;
|
uchar sprite = CRadar::ms_RadarTrace[i].m_nBlipSprite;
|
||||||
auto sprite_name = m_SpriteJson.m_Data[std::to_string(sprite)].get<std::string>();
|
auto sprite_name = m_SpriteJson.m_Data[std::to_string(sprite)].get<std::string>();
|
||||||
std::string key_name = sprite_name + ", " + Util::GetLocationName(&pos);
|
std::string key_name = sprite_name + ", " + Util::GetLocationName(&pos);
|
||||||
@ -103,7 +103,7 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, int interior_id)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CEntity* pPlayerEntity = FindPlayerEntity(-1);
|
CEntity* pPlayerEntity = FindPlayerEntity(-1);
|
||||||
pos = targetBlip.m_vPosition;
|
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;
|
||||||
|
|
||||||
m_Teleport::m_fPos = pos;
|
m_Teleport::m_fPos = pos;
|
||||||
@ -163,7 +163,7 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, int interior_id)
|
|||||||
if (pVeh && pPlayer->m_pVehicle)
|
if (pVeh && pPlayer->m_pVehicle)
|
||||||
{
|
{
|
||||||
#ifdef GTAVC
|
#ifdef GTAVC
|
||||||
pPlayer->m_nInterior = interior_id;
|
pPlayer->m_nAreaCode = interior_id;
|
||||||
#endif
|
#endif
|
||||||
pVeh->Teleport(pos);
|
pVeh->Teleport(pos);
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ void Teleport::TeleportPlayer(bool get_marker, CVector pos, int interior_id)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined GTASA || defined GTAVC
|
#if defined GTASA || defined GTAVC
|
||||||
BY_GAME(pPlayer->m_nAreaCode, pPlayer->m_nInterior, NULL) = interior_id;
|
pPlayer->m_nAreaCode = interior_id;
|
||||||
Command<Commands::SET_AREA_VISIBLE>(interior_id);
|
Command<Commands::SET_AREA_VISIBLE>(interior_id);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -63,10 +63,10 @@ void Util::SetCarForwardSpeed(CVehicle *pVeh, float speed)
|
|||||||
{
|
{
|
||||||
#ifdef GTA3
|
#ifdef GTA3
|
||||||
CVector inVec = pVeh->m_matrix.up;
|
CVector inVec = pVeh->m_matrix.up;
|
||||||
double speedFactor = speed * 0.016766668;
|
double factor = speed / 60.0;
|
||||||
pVeh->m_vecMoveSpeed.x = speedFactor * inVec.x;
|
pVeh->m_vecMoveSpeed.x = factor * inVec.x;
|
||||||
pVeh->m_vecMoveSpeed.y = speedFactor * inVec.y;
|
pVeh->m_vecMoveSpeed.y = factor * inVec.y;
|
||||||
pVeh->m_vecMoveSpeed.z = speedFactor * inVec.z;
|
pVeh->m_vecMoveSpeed.z = factor * inVec.z;
|
||||||
#else
|
#else
|
||||||
Command<Commands::SET_CAR_FORWARD_SPEED>(CPools::GetVehicleRef(pVeh), speed);
|
Command<Commands::SET_CAR_FORWARD_SPEED>(CPools::GetVehicleRef(pVeh), speed);
|
||||||
#endif
|
#endif
|
||||||
|
@ -80,7 +80,7 @@ void Vehicle::Init()
|
|||||||
pVeh->m_nPhysicalFlags.bExplosionProof = true;
|
pVeh->m_nPhysicalFlags.bExplosionProof = true;
|
||||||
pVeh->m_nPhysicalFlags.bFireProof = true;
|
pVeh->m_nPhysicalFlags.bFireProof = true;
|
||||||
pVeh->m_nPhysicalFlags.bCollisionProof = true;
|
pVeh->m_nPhysicalFlags.bCollisionProof = true;
|
||||||
pVeh->m_nPhysicalFlags.bMeeleProof = true;
|
pVeh->m_nPhysicalFlags.bMeleeProof = true;
|
||||||
pVeh->m_nVehicleFlags.bCanBeDamaged = true;
|
pVeh->m_nVehicleFlags.bCanBeDamaged = true;
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
pVeh->m_nFlags.bBulletProof = true;
|
pVeh->m_nFlags.bBulletProof = true;
|
||||||
@ -90,11 +90,11 @@ void Vehicle::Init()
|
|||||||
pVeh->m_nFlags.bMeleeProof = true;
|
pVeh->m_nFlags.bMeleeProof = true;
|
||||||
pVeh->m_nFlags.bImmuneToNonPlayerDamage = true;
|
pVeh->m_nFlags.bImmuneToNonPlayerDamage = true;
|
||||||
#else
|
#else
|
||||||
pVeh->m_nEntityFlags.bBulletProof = true;
|
pVeh->m_nFlags.bBulletProof = true;
|
||||||
pVeh->m_nEntityFlags.bExplosionProof = true;
|
pVeh->m_nFlags.bExplosionProof = true;
|
||||||
pVeh->m_nEntityFlags.bFireProof = true;
|
pVeh->m_nFlags.bFireProof = true;
|
||||||
pVeh->m_nEntityFlags.bCollisionProof = true;
|
pVeh->m_nFlags.bCollisionProof = true;
|
||||||
pVeh->m_nEntityFlags.bMeleeProof = true;
|
pVeh->m_nFlags.bMeleeProof = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,9 +107,7 @@ void Vehicle::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
|
if (m_UnlimitedNitro::m_bEnabled && pVeh->m_nVehicleSubClass == VEHICLE_AUTOMOBILE)
|
||||||
if (m_UnlimitedNitro::m_bEnabled
|
|
||||||
&& BY_GAME(pVeh->m_nVehicleSubClass, pVeh->m_nVehicleClass, NULL) == VEHICLE_AUTOMOBILE)
|
|
||||||
{
|
{
|
||||||
patch::Set<BYTE>(0x969165, 0, true); // All cars have nitro
|
patch::Set<BYTE>(0x969165, 0, true); // All cars have nitro
|
||||||
patch::Set<BYTE>(0x96918B, 0, true); // All taxis have nitro
|
patch::Set<BYTE>(0x96918B, 0, true); // All taxis have nitro
|
||||||
@ -207,7 +205,9 @@ void Vehicle::AddComponent(const std::string& component, const bool display_mess
|
|||||||
CStreaming::SetModelIsDeletable(icomp);
|
CStreaming::SetModelIsDeletable(icomp);
|
||||||
|
|
||||||
if (display_message)
|
if (display_message)
|
||||||
|
{
|
||||||
SetHelpMessage("Component added");
|
SetHelpMessage("Component added");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
@ -278,8 +278,8 @@ void WarpPlayerIntoVehicle(CVehicle *pVeh, int seatId)
|
|||||||
pPlayer->RegisterReference((CEntity**)&pPlayer->m_pVehicle);
|
pPlayer->RegisterReference((CEntity**)&pPlayer->m_pVehicle);
|
||||||
pPlayer->m_pObjectiveVehicle = pVeh;
|
pPlayer->m_pObjectiveVehicle = pVeh;
|
||||||
pPlayer->RegisterReference((CEntity**)&pPlayer->m_pObjectiveVehicle);
|
pPlayer->RegisterReference((CEntity**)&pPlayer->m_pObjectiveVehicle);
|
||||||
pPlayer->m_dwAction = ePedAction::Driving;
|
pPlayer->m_ePedState = ePedState::PEDSTATE_DRIVING;
|
||||||
pPlayer->m_dwObjective = OBJECTIVE_NO_OBJ;
|
pPlayer->m_nObjective = OBJECTIVE_NO_OBJ;
|
||||||
patch::Set<BYTE>(0x7838CD, 1); // player got in car flag
|
patch::Set<BYTE>(0x7838CD, 1); // player got in car flag
|
||||||
Call<0x41D370>(pVeh); // CCarCtrl::RegisterVehicleOfInterest
|
Call<0x41D370>(pVeh); // CCarCtrl::RegisterVehicleOfInterest
|
||||||
|
|
||||||
@ -317,8 +317,7 @@ void Vehicle::SpawnVehicle(const std::string& rootkey, const std::string& vehNam
|
|||||||
|
|
||||||
int imodel = std::stoi(smodel);
|
int imodel = std::stoi(smodel);
|
||||||
CVehicle* veh = nullptr;
|
CVehicle* veh = nullptr;
|
||||||
|
int interior = BY_GAME(player->m_nAreaCode, player->m_nAreaCode, NULL);
|
||||||
int interior = BY_GAME(player->m_nAreaCode, player->m_nInterior, 0);
|
|
||||||
|
|
||||||
CVector pos = player->GetPosition();
|
CVector pos = player->GetPosition();
|
||||||
float speed = 0;
|
float speed = 0;
|
||||||
@ -331,7 +330,6 @@ void Vehicle::SpawnVehicle(const std::string& rootkey, const std::string& vehNam
|
|||||||
pos = pveh->GetPosition();
|
pos = pveh->GetPosition();
|
||||||
|
|
||||||
Command<Commands::GET_CAR_SPEED>(hveh, &speed);
|
Command<Commands::GET_CAR_SPEED>(hveh, &speed);
|
||||||
|
|
||||||
Command<Commands::WARP_CHAR_FROM_CAR_TO_COORD>(hplayer, pos.x, pos.y, pos.z);
|
Command<Commands::WARP_CHAR_FROM_CAR_TO_COORD>(hplayer, pos.x, pos.y, pos.z);
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
@ -459,9 +457,9 @@ void Vehicle::SpawnVehicle(const std::string& rootkey, const std::string& vehNam
|
|||||||
veh->SetOrientation(x, y, z);
|
veh->SetOrientation(x, y, z);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
BY_GAME(veh->m_nDoorLock, veh->m_nLockStatus, veh->m_nDoorLock) = CARLOCK_UNLOCKED;
|
veh->m_nDoorLock = DOORLOCK_UNLOCKED;
|
||||||
#ifndef GTA3
|
#ifndef GTA3
|
||||||
BY_GAME(veh->m_nAreaCode, veh->m_nInterior, NULL) = interior;
|
BY_GAME(veh->m_nAreaCode, veh->m_nAreaCode, NULL) = interior;
|
||||||
#endif
|
#endif
|
||||||
Command<Commands::MARK_CAR_AS_NO_LONGER_NEEDED>(CPools::GetVehicleRef(veh));
|
Command<Commands::MARK_CAR_AS_NO_LONGER_NEEDED>(CPools::GetVehicleRef(veh));
|
||||||
CStreaming::SetModelIsDeletable(imodel);
|
CStreaming::SetModelIsDeletable(imodel);
|
||||||
@ -562,7 +560,7 @@ void Vehicle::ShowPage()
|
|||||||
pVeh->m_nPhysicalFlags.bExplosionProof = false;
|
pVeh->m_nPhysicalFlags.bExplosionProof = false;
|
||||||
pVeh->m_nPhysicalFlags.bFireProof = false;
|
pVeh->m_nPhysicalFlags.bFireProof = false;
|
||||||
pVeh->m_nPhysicalFlags.bCollisionProof = false;
|
pVeh->m_nPhysicalFlags.bCollisionProof = false;
|
||||||
pVeh->m_nPhysicalFlags.bMeeleProof = false;
|
pVeh->m_nPhysicalFlags.bMeleeProof = false;
|
||||||
pVeh->m_nVehicleFlags.bCanBeDamaged = false;
|
pVeh->m_nVehicleFlags.bCanBeDamaged = false;
|
||||||
#elif GTAVC
|
#elif GTAVC
|
||||||
pVeh->m_nFlags.bBulletProof = false;
|
pVeh->m_nFlags.bBulletProof = false;
|
||||||
@ -572,11 +570,11 @@ void Vehicle::ShowPage()
|
|||||||
pVeh->m_nFlags.bMeleeProof = false;
|
pVeh->m_nFlags.bMeleeProof = false;
|
||||||
pVeh->m_nFlags.bImmuneToNonPlayerDamage = false;
|
pVeh->m_nFlags.bImmuneToNonPlayerDamage = false;
|
||||||
#else
|
#else
|
||||||
pVeh->m_nEntityFlags.bBulletProof = false;
|
pVeh->m_nFlags.bBulletProof = false;
|
||||||
pVeh->m_nEntityFlags.bExplosionProof = false;
|
pVeh->m_nFlags.bExplosionProof = false;
|
||||||
pVeh->m_nEntityFlags.bFireProof = false;
|
pVeh->m_nFlags.bFireProof = false;
|
||||||
pVeh->m_nEntityFlags.bCollisionProof = false;
|
pVeh->m_nFlags.bCollisionProof = false;
|
||||||
pVeh->m_nEntityFlags.bMeleeProof = false;
|
pVeh->m_nFlags.bMeleeProof = false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -666,16 +664,16 @@ void Vehicle::ShowPage()
|
|||||||
pVeh->m_nVehicleFlags.bAlwaysSkidMarks = state;
|
pVeh->m_nVehicleFlags.bAlwaysSkidMarks = state;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
state = BY_GAME(pVeh->m_nPhysicalFlags.bBulletProof, pVeh->m_nFlags.bBulletProof, pVeh->m_nEntityFlags.bBulletProof);
|
state = BY_GAME(pVeh->m_nPhysicalFlags.bBulletProof, pVeh->m_nFlags.bBulletProof, pVeh->m_nFlags.bBulletProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Vehicle.BulletProof"), &state, nullptr, m_bNoDamage))
|
if (Ui::CheckboxWithHint(TEXT("Vehicle.BulletProof"), &state, nullptr, m_bNoDamage))
|
||||||
{
|
{
|
||||||
BY_GAME(pVeh->m_nPhysicalFlags.bBulletProof, pVeh->m_nFlags.bBulletProof, pVeh->m_nEntityFlags.bBulletProof) = state;
|
BY_GAME(pVeh->m_nPhysicalFlags.bBulletProof, pVeh->m_nFlags.bBulletProof, pVeh->m_nFlags.bBulletProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pVeh->m_nPhysicalFlags.bCollisionProof, pVeh->m_nFlags.bCollisionProof, pVeh->m_nEntityFlags.bCollisionProof);
|
state = BY_GAME(pVeh->m_nPhysicalFlags.bCollisionProof, pVeh->m_nFlags.bCollisionProof, pVeh->m_nFlags.bCollisionProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Vehicle.ColProof"), &state, nullptr, m_bNoDamage))
|
if (Ui::CheckboxWithHint(TEXT("Vehicle.ColProof"), &state, nullptr, m_bNoDamage))
|
||||||
{
|
{
|
||||||
BY_GAME(pVeh->m_nPhysicalFlags.bCollisionProof, pVeh->m_nFlags.bCollisionProof, pVeh->m_nEntityFlags.bCollisionProof) = state;
|
BY_GAME(pVeh->m_nPhysicalFlags.bCollisionProof, pVeh->m_nFlags.bCollisionProof, pVeh->m_nFlags.bCollisionProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
@ -701,16 +699,16 @@ void Vehicle::ShowPage()
|
|||||||
pVeh->m_nVehicleFlags.bEngineOn = state;
|
pVeh->m_nVehicleFlags.bEngineOn = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pVeh->m_nPhysicalFlags.bExplosionProof, pVeh->m_nFlags.bExplosionProof, pVeh->m_nEntityFlags.bExplosionProof);
|
state = BY_GAME(pVeh->m_nPhysicalFlags.bExplosionProof, pVeh->m_nFlags.bExplosionProof, pVeh->m_nFlags.bExplosionProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Vehicle.ExplosionProof"), &state, nullptr, m_bNoDamage))
|
if (Ui::CheckboxWithHint(TEXT("Vehicle.ExplosionProof"), &state, nullptr, m_bNoDamage))
|
||||||
{
|
{
|
||||||
BY_GAME(pVeh->m_nPhysicalFlags.bExplosionProof, pVeh->m_nFlags.bExplosionProof, pVeh->m_nEntityFlags.bExplosionProof) = state;
|
BY_GAME(pVeh->m_nPhysicalFlags.bExplosionProof, pVeh->m_nFlags.bExplosionProof, pVeh->m_nFlags.bExplosionProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pVeh->m_nPhysicalFlags.bFireProof, pVeh->m_nFlags.bFireProof, pVeh->m_nEntityFlags.bFireProof);
|
state = BY_GAME(pVeh->m_nPhysicalFlags.bFireProof, pVeh->m_nFlags.bFireProof, pVeh->m_nFlags.bFireProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Vehicle.FireProof"), &state, nullptr, m_bNoDamage))
|
if (Ui::CheckboxWithHint(TEXT("Vehicle.FireProof"), &state, nullptr, m_bNoDamage))
|
||||||
{
|
{
|
||||||
BY_GAME(pVeh->m_nPhysicalFlags.bFireProof, pVeh->m_nFlags.bFireProof, pVeh->m_nEntityFlags.bFireProof) = state;
|
BY_GAME(pVeh->m_nPhysicalFlags.bFireProof, pVeh->m_nFlags.bFireProof, pVeh->m_nFlags.bFireProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
@ -723,10 +721,10 @@ void Vehicle::ShowPage()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
state = !BY_GAME(pVeh->m_bIsVisible, pVeh->m_nFlags.bIsVisible, pVeh->m_nEntityFlags.bIsVisible);
|
state = !BY_GAME(pVeh->m_bIsVisible, pVeh->m_nFlags.bIsVisible, pVeh->m_nFlags.bIsVisible);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Vehicle.InvisCar"), &state, nullptr, !is_driver))
|
if (Ui::CheckboxWithHint(TEXT("Vehicle.InvisCar"), &state, nullptr, !is_driver))
|
||||||
{
|
{
|
||||||
BY_GAME(pVeh->m_bIsVisible, pVeh->m_nFlags.bIsVisible, pVeh->m_nEntityFlags.bIsVisible) = !state;
|
BY_GAME(pVeh->m_bIsVisible, pVeh->m_nFlags.bIsVisible, pVeh->m_nFlags.bIsVisible) = !state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(!pVeh->ms_forceVehicleLightsOff, pVeh->m_nVehicleFlags.bLightsOn, pVeh->m_nVehicleFlags.bLightsOn);
|
state = BY_GAME(!pVeh->ms_forceVehicleLightsOff, pVeh->m_nVehicleFlags.bLightsOn, pVeh->m_nVehicleFlags.bLightsOn);
|
||||||
@ -735,23 +733,16 @@ void Vehicle::ShowPage()
|
|||||||
BY_GAME(pVeh->ms_forceVehicleLightsOff, pVeh->m_nVehicleFlags.bLightsOn, pVeh->m_nVehicleFlags.bLightsOn) = state;
|
BY_GAME(pVeh->ms_forceVehicleLightsOff, pVeh->m_nVehicleFlags.bLightsOn, pVeh->m_nVehicleFlags.bLightsOn) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pVeh->m_nDoorLock, pVeh->m_nLockStatus, pVeh->m_nDoorLock) == CARLOCK_LOCKED_PLAYER_INSIDE;
|
state = pVeh->m_nDoorLock == DOORLOCK_LOCKED_PLAYER_INSIDE;
|
||||||
if (Ui::CheckboxWithHint(TEXT("Vehicle.LockDoor"), &state, nullptr, !is_driver))
|
if (Ui::CheckboxWithHint(TEXT("Vehicle.LockDoor"), &state, nullptr, !is_driver))
|
||||||
{
|
{
|
||||||
if (state)
|
pVeh->m_nDoorLock = state ? DOORLOCK_LOCKED_PLAYER_INSIDE : DOORLOCK_UNLOCKED;
|
||||||
{
|
|
||||||
BY_GAME(pVeh->m_nDoorLock, pVeh->m_nLockStatus, pVeh->m_nDoorLock) = CARLOCK_LOCKED_PLAYER_INSIDE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
BY_GAME(pVeh->m_nDoorLock, pVeh->m_nLockStatus, pVeh->m_nDoorLock) = CARLOCK_UNLOCKED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
state = BY_GAME(pVeh->m_nPhysicalFlags.bMeeleProof, pVeh->m_nFlags.bMeleeProof, pVeh->m_nEntityFlags.bMeleeProof);
|
state = BY_GAME(pVeh->m_nPhysicalFlags.bMeleeProof, pVeh->m_nFlags.bMeleeProof, pVeh->m_nFlags.bMeleeProof);
|
||||||
if (Ui::CheckboxWithHint(TEXT("Vehicle.MeleeProof"), &state, nullptr, m_bNoDamage))
|
if (Ui::CheckboxWithHint(TEXT("Vehicle.MeleeProof"), &state, nullptr, m_bNoDamage))
|
||||||
{
|
{
|
||||||
BY_GAME(pVeh->m_nPhysicalFlags.bMeeleProof, pVeh->m_nFlags.bMeleeProof, pVeh->m_nEntityFlags.bMeleeProof) = state;
|
BY_GAME(pVeh->m_nPhysicalFlags.bMeleeProof, pVeh->m_nFlags.bMeleeProof, pVeh->m_nFlags.bMeleeProof) = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
@ -795,11 +786,8 @@ void Vehicle::ShowPage()
|
|||||||
|
|
||||||
if (pClosestVeh)
|
if (pClosestVeh)
|
||||||
{
|
{
|
||||||
#ifdef GTA3
|
|
||||||
int seats = pClosestVeh->m_nNumMaxPassengers;
|
|
||||||
#else
|
|
||||||
int seats = pClosestVeh->m_nMaxPassengers;
|
int seats = pClosestVeh->m_nMaxPassengers;
|
||||||
#endif
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::Columns(2, 0, false);
|
ImGui::Columns(2, 0, false);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ void Weapon::Init()
|
|||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
if (m_bAutoAim)
|
if (m_bAutoAim)
|
||||||
{
|
{
|
||||||
if (CPad::NewMouseControllerState.X == 0 && CPad::NewMouseControllerState.Y == 0)
|
if (CPad::NewMouseControllerState.x == 0 && CPad::NewMouseControllerState.y == 0)
|
||||||
{
|
{
|
||||||
if (KeyPressed(2))
|
if (KeyPressed(2))
|
||||||
{
|
{
|
||||||
@ -28,15 +28,10 @@ void Weapon::Init()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
uchar slot = BY_GAME(player->m_nActiveWeaponSlot, player->m_nActiveWeaponSlot, player->m_nCurrentWeapon);
|
uchar slot = player->m_nCurrentWeapon;
|
||||||
if (m_nCurrentWeaponSlot != slot)
|
if (m_nCurrentWeaponSlot != slot)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef GTA3
|
|
||||||
eWeaponType weaponType = player->m_aWeapons[slot].m_eWeaponType;
|
eWeaponType weaponType = player->m_aWeapons[slot].m_eWeaponType;
|
||||||
#else
|
|
||||||
eWeaponType weaponType = player->m_aWeapons[slot].m_nType;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
CWeaponInfo* pWeaponInfo = CWeaponInfo::GetWeaponInfo(weaponType, player->GetWeaponSkill(weaponType));
|
CWeaponInfo* pWeaponInfo = CWeaponInfo::GetWeaponInfo(weaponType, player->GetWeaponSkill(weaponType));
|
||||||
@ -116,29 +111,27 @@ static void ClearPlayerWeapon(eWeaponType weaponType)
|
|||||||
{
|
{
|
||||||
CWeapon *pWeapon = &pPlayer->m_aWeapons[weaponSlot];
|
CWeapon *pWeapon = &pPlayer->m_aWeapons[weaponSlot];
|
||||||
|
|
||||||
#ifdef GTA3
|
|
||||||
if (pWeapon->m_eWeaponType == weaponType)
|
if (pWeapon->m_eWeaponType == weaponType)
|
||||||
{
|
{
|
||||||
if (pPlayer->m_nCurrentWeapon == weaponSlot)
|
if (pPlayer->m_nCurrentWeapon == weaponSlot)
|
||||||
{
|
{
|
||||||
|
#ifdef GTA3
|
||||||
Command<Commands::SET_CURRENT_PLAYER_WEAPON>(0, WEAPONTYPE_UNARMED);
|
Command<Commands::SET_CURRENT_PLAYER_WEAPON>(0, WEAPONTYPE_UNARMED);
|
||||||
}
|
|
||||||
// This doesn't work for melee weapons aka bats, chainsaw etc
|
|
||||||
pWeapon->m_eWeaponState = WEAPONSTATE_OUT_OF_AMMO;
|
|
||||||
pWeapon->m_nAmmoTotal = 0;
|
|
||||||
pWeapon->m_nAmmoInClip = 0;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if (pWeapon->m_nType == weaponType)
|
|
||||||
{
|
|
||||||
if (pPlayer->m_nActiveWeaponSlot == weaponSlot)
|
|
||||||
{
|
|
||||||
CWeaponInfo *pWeaponInfo = CWeaponInfo::GetWeaponInfo(WEAPONTYPE_UNARMED);
|
CWeaponInfo *pWeaponInfo = CWeaponInfo::GetWeaponInfo(WEAPONTYPE_UNARMED);
|
||||||
pPlayer->SetCurrentWeapon(pWeaponInfo->m_WeaponSlot);
|
pPlayer->SetCurrentWeapon(pWeaponInfo->m_WeaponSlot);
|
||||||
}
|
|
||||||
pWeapon->Shutdown();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
#ifdef GTA3
|
||||||
|
// This doesn't work for melee weapons aka bats, chainsaw etc
|
||||||
|
pWeapon->m_eWeaponState = WEAPONSTATE_OUT_OF_AMMO;
|
||||||
|
pWeapon->m_nAmmoTotal = 0;
|
||||||
|
pWeapon->m_nAmmoInClip = 0;
|
||||||
|
#else
|
||||||
|
pWeapon->Shutdown();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,12 +229,7 @@ void Weapon::ShowPage()
|
|||||||
float x, y, z;
|
float x, y, z;
|
||||||
Command<Commands::GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS>(hplayer, 0.0, 3.0, 0.0, &x, &y, &z);
|
Command<Commands::GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS>(hplayer, 0.0, 3.0, 0.0, &x, &y, &z);
|
||||||
|
|
||||||
#ifdef GTA3
|
|
||||||
eWeaponType weaponType = pPlayer->m_aWeapons[pPlayer->m_nCurrentWeapon].m_eWeaponType;
|
eWeaponType weaponType = pPlayer->m_aWeapons[pPlayer->m_nCurrentWeapon].m_eWeaponType;
|
||||||
#else
|
|
||||||
eWeaponType weaponType = pPlayer->m_aWeapons[pPlayer->m_nActiveWeaponSlot].m_nType;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (weaponType)
|
if (weaponType)
|
||||||
{
|
{
|
||||||
int model = 0, pickup = 0;
|
int model = 0, pickup = 0;
|
||||||
@ -269,9 +257,7 @@ void Weapon::ShowPage()
|
|||||||
if (ImGui::Button(TEXT("Weapon.DropCurrent"), Ui::GetSize(3)))
|
if (ImGui::Button(TEXT("Weapon.DropCurrent"), Ui::GetSize(3)))
|
||||||
{
|
{
|
||||||
#ifdef GTASA
|
#ifdef GTASA
|
||||||
Command<Commands::REMOVE_WEAPON_FROM_CHAR>(hplayer, pPlayer->m_aWeapons[pPlayer->m_nActiveWeaponSlot].m_nType);
|
Command<Commands::REMOVE_WEAPON_FROM_CHAR>(hplayer, pPlayer->m_aWeapons[pPlayer->m_nCurrentWeapon].m_eWeaponType);
|
||||||
#elif GTAVC
|
|
||||||
ClearPlayerWeapon(pPlayer->m_aWeapons[pPlayer->m_nActiveWeaponSlot].m_nType);
|
|
||||||
#else
|
#else
|
||||||
ClearPlayerWeapon(pPlayer->m_aWeapons[pPlayer->m_nCurrentWeapon].m_eWeaponType);
|
ClearPlayerWeapon(pPlayer->m_aWeapons[pPlayer->m_nCurrentWeapon].m_eWeaponType);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user