I don't know if this is the right section, but oh well.
Well, I have a server, but no one seems to be downloading any of the custom files and keep saying "Oh I see errors!" I heard you use "Resource.AddFile" or something, but is there a way to make it for the entire folder? (one by one will take tooooooo much time)
Also, why do people always download the same files over and over again everytime they join?
[QUOTE=lildragon555;17699371]I don't know if this is the right section, but oh well.
Well, I have a server, but no one seems to be downloading any of the custom files and keep saying "Oh I see errors!" I heard you use "Resource.AddFile" or something, but is there a way to make it for the entire folder? (one by one will take tooooooo much time)
Also, why do people always download the same files over and over again everytime they join?[/QUOTE]
Take a look at the last example on this page.
[url]http://wiki.garrysmod.com/?title=Resource.AddFile[/url]
I know that, but how do I do that for the addons folder?
[QUOTE=lildragon555;17715839]I know that, but how do I do that for the addons folder?[/QUOTE]
Try this. Haven't tested it; could fail.
[lua]
function AddDir(dir) // recursively adds everything in a directory to be downloaded by client
local list = file.FindDir("../"..dir.."/*")
for _, fdir in pairs(list) do
if fdir != ".svn" then // don't spam people with useless .svn folders
AddDir(fdir)
end
end
for k,v in pairs(file.Find("../"..dir.."/*")) do
resource.AddFile(dir.."/"..v)
end
end
AddDir("addons")
[/lua]
I tried that thing you told me to do, but people say that it says they have to download them, but they don't
IE: 25 Textures
50 Lua
Sending Client Info (WTF? what's with the 75 I didn't get yet?)
They probably have 'download custom files' disabled in options..
Omg, I finally got this to work, but the people are downloading EVERY SINGLE FILE on the server, thats over 1000-2000 files
[QUOTE=lildragon555;17757638]Omg, I finally got this to work, but the people are downloading EVERY SINGLE FILE on the server, thats over 1000-2000 files[/QUOTE]
Then just direct it to only one folder and not all..
Tried that, didn't work
Sorry, you need to Log In to post a reply to this thread.