This commit is contained in:
Grinch_ 2023-01-03 01:55:46 +06:00
parent e69fb5b880
commit bcbb4d6418
3 changed files with 36 additions and 27 deletions

View File

@ -338,7 +338,8 @@ Steps to enable 'Custom Skins',
Limitations: Limitations:
1. Your .dff & .txd file names must not exceed 8 characters. 1. Your .dff & .txd file names must not exceed 8 characters.
2. Do not rename them while the game is running 2. Do NOT rename them while the game is running
3. Do NOT name your files to existing ped names
Doing so will crash your game.""" Doing so will crash your game."""
CycleJump = "Higher cycle jumps" CycleJump = "Higher cycle jumps"

View File

@ -206,12 +206,6 @@ CheatMenuMgr::CheatMenuMgr()
return; return;
} }
if (!D3dHook::Init(fArgNoneWrapper(CheatMenu.Draw)))
{
return;
}
ApplyStyle();
Locale::Init(FILE_NAME "/locale/", "English", "English"); Locale::Init(FILE_NAME "/locale/", "English", "English");
Locale::SetLocaleByName(gConfig.Get("Menu.Language", "")); Locale::SetLocaleByName(gConfig.Get("Menu.Language", ""));
Overlay::Init(); Overlay::Init();
@ -225,6 +219,17 @@ CheatMenuMgr::CheatMenuMgr()
srand(CTimer::m_snTimeInMilliseconds); srand(CTimer::m_snTimeInMilliseconds);
}; };
// Doesn't work with ThirteenAG's windowed mode while inside initRwEvent
Events::initGameEvent += [this]()
{
if (!D3dHook::Init(fArgNoneWrapper(CheatMenu.Draw)))
{
return;
}
ApplyStyle();
};
Events::processScriptsEvent += [this]() Events::processScriptsEvent += [this]()
{ {
if (!FrontEndMenuManager.m_bMenuActive) if (!FrontEndMenuManager.m_bMenuActive)

View File

@ -4,6 +4,8 @@
CustomSkinsMgr& CustomSkins = CustomSkinsMgr::Get(); CustomSkinsMgr& CustomSkins = CustomSkinsMgr::Get();
CustomSkinsMgr::CustomSkinsMgr() CustomSkinsMgr::CustomSkinsMgr()
{
Events::initRwEvent += [this]()
{ {
std::string path = GAME_PATH((char*)"modloader/"); std::string path = GAME_PATH((char*)"modloader/");
if (GetModuleHandle("modloader.asi") && std::filesystem::is_directory(path)) if (GetModuleHandle("modloader.asi") && std::filesystem::is_directory(path))
@ -34,6 +36,7 @@ CustomSkinsMgr::CustomSkinsMgr()
} }
m_bInit = true; m_bInit = true;
} }
};
} }
void CustomSkinsMgr::SetSkin(const std::string& name) void CustomSkinsMgr::SetSkin(const std::string& name)