Fix color changer not working (vc)
This commit is contained in:
parent
45f033f2d2
commit
09217144ac
@ -250,7 +250,6 @@ BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved)
|
||||
MessageBox(HWND_DESKTOP, "Unknown game version. GTA SA v1.0 US is required.", "CheatMenu", MB_ICONERROR);
|
||||
}
|
||||
#elif GTAVC
|
||||
MessageBox(RsGlobal.ps->window, "Unknown game version. GTA VC v1.0 EN is required.", "CheatMenu", MB_ICONERROR);
|
||||
|
||||
if (gameVersion == GAME_10EN)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "Weapon.h"
|
||||
class CheatMenu : Hook, Animation, Game, Menu, Ped, Player, Teleport, Vehicle, Visual, Weapon
|
||||
#elif GTAVC
|
||||
class CheatMenu : Hook, Animation, Menu, Player, Ped, Teleport
|
||||
class CheatMenu : Hook, Animation, Menu, Player, Ped, Teleport, Vehicle
|
||||
#endif
|
||||
|
||||
{
|
||||
|
@ -2,5 +2,5 @@
|
||||
#define MENU_NAME "Cheat Menu"
|
||||
#define MENU_VERSION_NUMBER "2.9"
|
||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
||||
#define BUILD_NUMBER "20210806"
|
||||
#define BUILD_NUMBER "20210813"
|
||||
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"
|
||||
|
@ -10,7 +10,6 @@ ResourceStore::ResourceStore(const char* text, eResourceType type)
|
||||
{
|
||||
if (!m_bTexturesLoaded)
|
||||
{
|
||||
// LoadTextureDirectory(ResourceStore& data, char* path, bool pass_full_name)
|
||||
LoadTextureResource(text);
|
||||
m_bTexturesLoaded = true;
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ Vehicle::Vehicle()
|
||||
#ifdef GTASA
|
||||
ParseVehiclesIDE();
|
||||
#endif
|
||||
ParseCarcolsDAT();
|
||||
|
||||
Events::processScriptsEvent += [this]
|
||||
{
|
||||
ParseCarcolsDAT();
|
||||
uint timer = CTimer::m_snTimeInMilliseconds;
|
||||
CPlayerPed* pPlayer = FindPlayerPed();
|
||||
CVehicle* pVeh = pPlayer->m_pVehicle;
|
||||
@ -1145,8 +1145,11 @@ void Vehicle::Draw()
|
||||
Paint::SetNodeColor(veh, Paint::veh_nodes::selected, { r, g, b, 255 }, m_Color::m_bMatFilter);
|
||||
}
|
||||
#endif
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::Columns(2, NULL, false);
|
||||
|
||||
#ifdef GTASA
|
||||
ImGui::Checkbox("Material filter", &m_Color::m_bMatFilter);
|
||||
ImGui::RadioButton("Primary", &m_Color::m_nRadioButton, 1);
|
||||
ImGui::RadioButton("Secondary", &m_Color::m_nRadioButton, 2);
|
||||
@ -1154,6 +1157,13 @@ void Vehicle::Draw()
|
||||
ImGui::Checkbox("Show all", &m_Color::bShowAll);
|
||||
ImGui::RadioButton("Tertiary", &m_Color::m_nRadioButton, 3);
|
||||
ImGui::RadioButton("Quaternary", &m_Color::m_nRadioButton, 4);
|
||||
#elif GTAVC
|
||||
ImGui::Checkbox("Show all", &m_Color::bShowAll);
|
||||
ImGui::RadioButton("Primary", &m_Color::m_nRadioButton, 1);
|
||||
ImGui::NextColumn();
|
||||
ImGui::NewLine();
|
||||
ImGui::RadioButton("Secondary", &m_Color::m_nRadioButton, 2);
|
||||
#endif
|
||||
ImGui::Spacing();
|
||||
ImGui::Columns(1);
|
||||
ImGui::Text("Select color preset:");
|
||||
@ -1174,7 +1184,7 @@ void Vehicle::Draw()
|
||||
{
|
||||
if (Ui::ColorButton(colorId, m_CarcolsColorData[colorId], ImVec2(btnSize, btnSize)))
|
||||
{
|
||||
*(uint8_replacement*)(int(veh) + 0x433 + m_Color::m_nRadioButton) = colorId;
|
||||
*(uint8_replacement*)(int(veh) + BY_GAME(0x433, 0x19F) + m_Color::m_nRadioButton) = colorId;
|
||||
}
|
||||
|
||||
if ((colorId + 1) % btnsInRow != 0)
|
||||
@ -1196,7 +1206,7 @@ void Vehicle::Draw()
|
||||
if (Ui::ColorButton(colorId, m_CarcolsColorData[colorId],
|
||||
ImVec2(btnSize, btnSize)))
|
||||
{
|
||||
*(uint8_replacement*)(int(veh) + 0x433 + m_Color::m_nRadioButton) = colorId;
|
||||
*(uint8_replacement*)(int(veh) + BY_GAME(0x433, 0x19F) + m_Color::m_nRadioButton) = colorId;
|
||||
}
|
||||
|
||||
if (count % btnsInRow != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user