diff --git a/lua/autorun/metrostroi.lua b/lua/autorun/metrostroi.lua index 8c0d93a..62a489c 100644 --- a/lua/autorun/metrostroi.lua +++ b/lua/autorun/metrostroi.lua @@ -133,14 +133,14 @@ function Metrostroi.AddSkin(category,name,tbl) tbl = Table end if CLIENT and tbl.textures then - local find + local nofind for k,v in pairs(tbl.textures) do - if not file.Exists("materials/"..v..".vmt","GAME") then - find = true + if not file.Exists("materials/"..v..".vmt","GAME") and not file.Exists("materials/models/"..v..".vmt","GAME") then + nofind = true ErrorNoHalt(Format("Metrostroi: %s texture: %s, not found. Check folder and addons!\n",category,v)) end end - if find then return end + if nofind then return end end if not Metrostroi.Skins[category] then print(Format("Metrostroi: Added a %s skin category",category)) @@ -1034,4 +1034,4 @@ if SERVER then end end, "metrostroiMonitoring") hook.Add("ShutDown","MetrostroiMonitoring",shutdown) -end \ No newline at end of file +end