go to clua.cpp and put this
void c_lua::refresh_scripts()
{
auto oldLoaded = loaded;
auto oldScripts = scripts;
loaded.clear();
pathes.clear();
scripts.clear();
ns_console::convars.clear();
std::string folder = crypt_str("C:\\Divension\\Scripts\\");
auto i = 0;
for (auto& entry : std::filesystem::directory_iterator(folder))
{
if (entry.path().extension() == crypt_str(".lua") || entry.path().extension() == crypt_str(".luac"))
{
auto path = entry.path();
auto filename = path.filename().string();
auto didPut = false;
for (auto i = 0; i < oldScripts.size(); i++)
{
if (filename == oldScripts.at(i))
{
loaded.emplace_back(oldLoaded.at(i));
didPut = true;
}
}
if (!didPut)
loaded.emplace_back(false);
pathes.emplace_back(path);
scripts.emplace_back(filename);
items.emplace_back(std::vector <std::pair <std::string, menu_item>>());
++i;
}
}
}
for me work
but fps drop alot