Hey facepunch. I recently got a 12 slot server for Garry's Mod, and I am having an issue with the fast download server part. I have made the server.cfg say sv_download 1 and the sv_downloadurl to (I am using [url]www.000webhost.com[/url]) [url]http://whatever.subdomain.com/garrysmod[/url] and some sub directories. Can anyone help me step by step?
Also, on the my server you cannot download maps it let you download for three seconds and it seems like it skips the files, then it will say you are missing the map and disconnects you.
EDIT: Ok, I got it to download at the crappy 20kbps speed, but the fast dl still doesn't work. Did I setup the folders right?
First of all, you should disable the sv_download. This might seem a bit weird, but sv_download actually indicates whether downloads are allowed from the server itself, not the download url. If you've done that, you should be able to download from the server specified at sv_downloadurl.
To get downloading of maps working, you should increase your net_maxfilesize. By default, this is around 20 mb I believe, you should try to increase it to like 70.
If you want to transfer models, materials, etc. besides maps, you should add those files using resources.AddFile. You can use this script to add directories, but don't add the entire models or materials directory, there's a limit to the number of resources you can set available for download.
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
for k,v in pairs(file.Find("../"..dir.."/*")) do
Finally, I would recommend to use bzip compression on you downloadserver, which will decrease the download time of maps and models.
Thanks for the reply, I stood up until 4am and I fixed it heh. I have an admin mod, called ULX and I was looking through the files and I do believe there is an option to do that in there.
EDIT: How can I make a map rotation script? ULX mentions something about putting it in the server.cfg but I don't know what to set it as? sv_votemapmode? or just votemapmode "insert name?"
I am also getting some error about lua cache couldn't be downloaded, can anyone help?
[QUOTE=reaply;31322374]I am also getting some error about lua cache couldn't be downloaded, can anyone help?[/QUOTE]
The lua cache is something that gets generated by Garry's Mod every time the server starts after some addons have changed. You'll need to upload it every time it changes.
Take a look in your garrysmod/cache folder and double-check it's the same on your download server.
[QUOTE=The Mad Man;31345002]The lua cache is something that gets generated by Garry's Mod every time the server starts after some addons have changed. You'll need to upload it every time it changes.
Take a look in your garrysmod/cache folder and double-check it's the same on your download server.[/QUOTE]
Thanks for the responce. So it only generates after startup, that's good to know. What about the force download.lua? Can anyone give me an example of it?
Sorry, you need to Log In to post a reply to this thread.