I run a server, and I wan't to add some models, but I don't want people to go all the way to gmod.org to download them, so Is there a way to make people download things on entry to the server?
yeah I need help with this too.except I'm putting a map :\
I've just proved that it does not automatically make you download things, I installed a player model for one of my admins, and I didn't install it on my gmod, And I can't see it, I didn't download anything from my server.
Maps are automaticaly downloaded. As for downloading things [url]http://wiki.garrysmod.com/?title=Resource.AddFile[/url]
[QUOTE=WTF Nuke;16921795]Maps are automaticaly downloaded. As for downloading things [url]http://wiki.garrysmod.com/?title=Resource.AddFile[/url][/QUOTE]
and how do I do that?I'm not a lua scripter :P
[QUOTE=XxAthrunxX;16921906]and how do I do that?I'm not a lua scripter :P[/QUOTE]
Do what? Maps are automatically downloaded, you don't have to do anything,
Thanks nuke :P
[QUOTE=Swerf;16928379]Thanks nuke :P[/QUOTE]
No prob The below is purely stupid and has nothing to do with anything
:butt:
:cawg:
[QUOTE=WTF Nuke;16922629]Do what? Maps are automatically downloaded, you don't have to do anything,[/QUOTE]
I know
I meant for sound files on my server.oh well.
Athruns. You just make a notepad file and put resource.AddFile("Sounds/Soundname.wav/mp3")
then save it as like download.lua and put it in your lua/autorun
Doing that on a mass scale however takes fucking ages. I know theres an LUA method, seen it used before but I cannot quote it like for like and I don't have it remembered.
[QUOTE=KFrohman;16957860]Doing that on a mass scale however takes fucking ages. I know theres an LUA method, seen it used before but I cannot quote it like for like and I don't have it remembered.[/QUOTE]
function AddDir(dir) //
local list = file.FindDir("../"..dir.."/*")
for _, fdir in pairs(list) do
if fdir != ".svn" then //
AddDir(fdir)
end
end
for k,v in pairs(file.Find("../"..dir.."/*")) do
resource.AddFile(dir.."/"..v)
end
end
Adding a directory?
Sorry, you need to Log In to post a reply to this thread.