Fix bugs #83
This commit is contained in:
parent
e69fb5b880
commit
bcbb4d6418
@ -338,7 +338,8 @@ Steps to enable 'Custom Skins',
|
||||
Limitations:
|
||||
|
||||
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."""
|
||||
CycleJump = "Higher cycle jumps"
|
||||
|
@ -206,12 +206,6 @@ CheatMenuMgr::CheatMenuMgr()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!D3dHook::Init(fArgNoneWrapper(CheatMenu.Draw)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyStyle();
|
||||
Locale::Init(FILE_NAME "/locale/", "English", "English");
|
||||
Locale::SetLocaleByName(gConfig.Get("Menu.Language", ""));
|
||||
Overlay::Init();
|
||||
@ -225,6 +219,17 @@ CheatMenuMgr::CheatMenuMgr()
|
||||
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]()
|
||||
{
|
||||
if (!FrontEndMenuManager.m_bMenuActive)
|
||||
|
@ -5,35 +5,38 @@
|
||||
CustomSkinsMgr& CustomSkins = CustomSkinsMgr::Get();
|
||||
CustomSkinsMgr::CustomSkinsMgr()
|
||||
{
|
||||
std::string path = GAME_PATH((char*)"modloader/");
|
||||
if (GetModuleHandle("modloader.asi") && std::filesystem::is_directory(path))
|
||||
Events::initRwEvent += [this]()
|
||||
{
|
||||
path += "CustomSkinsLoader/";
|
||||
if (std::filesystem::is_directory(path))
|
||||
std::string path = GAME_PATH((char*)"modloader/");
|
||||
if (GetModuleHandle("modloader.asi") && std::filesystem::is_directory(path))
|
||||
{
|
||||
for (auto& p : std::filesystem::recursive_directory_iterator(path))
|
||||
path += "CustomSkinsLoader/";
|
||||
if (std::filesystem::is_directory(path))
|
||||
{
|
||||
if (p.path().extension() == ".dff")
|
||||
for (auto& p : std::filesystem::recursive_directory_iterator(path))
|
||||
{
|
||||
std::string file_name = p.path().stem().string();
|
||||
if (p.path().extension() == ".dff")
|
||||
{
|
||||
std::string file_name = p.path().stem().string();
|
||||
|
||||
if (file_name.size() < 9)
|
||||
{
|
||||
m_List.push_back(file_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log::Print<eLogLevel::Error>("Custom Skin longer than 8 characters {}", file_name);
|
||||
if (file_name.size() < 9)
|
||||
{
|
||||
m_List.push_back(file_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log::Print<eLogLevel::Error>("Custom Skin longer than 8 characters {}", file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::filesystem::create_directory(path);
|
||||
}
|
||||
m_bInit = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::filesystem::create_directory(path);
|
||||
}
|
||||
m_bInit = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void CustomSkinsMgr::SetSkin(const std::string& name)
|
||||
|
Loading…
Reference in New Issue
Block a user