My server is not prompting me to download addons.

As the title says;

The addon I want to be prompted for download, is not working.

i.e, when I join my server without an addon the server has, it doesn’t download.

My server.cfg is set up correctly to my knowledge, here is what the relevant parts look like.

sv_downloadurl “http://37.187.238.239/fastdl/garrysmod/
sv_allowdownload 0
sv_allowupload 0

I have a resource.lua in my /lua/autorun/server folder.

I acquired it using this method: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexf8be.html

It all looks good if a little untidy, nonetheless, it should and has worked.

resource.AddFile(“sound_fasalpha/cstm/attach.wav.bz2”)
resource.AddFile(“sound_fasalpha/cstm/detach.wav.bz2”)
resource.AddFile(“sound_fasalpha/weapons/m4a1/m4_boltcatch.wav.bz2”)
resource.AddFile(“sound_fasalpha/weapons/m4a1/m4_selector.wav.bz2”)
resource.AddFile(“sound_fasalpha/weapons/sg55x/sg550_magin.wav.bz2”)
resource.AddFile(“sound_fasalpha/weapons/sg55x/sg550_suppressed_fire1.wav.bz2”)

(Just a few because the whole file is huge. Could this be the problem? Is the file too big? FYI, This is only one weapon pack.)

My webhost is set up correctly, as I said above, It has worked before.

The content I want to be downloaded by clients is all on the webhost, and all bzipped.

I have no idea what I’ve done so if someone can shed some light on the situation I’d be very greatful.

Also if any other information is needed, please ask.

Got a few problems here.

  1. Your FastDL directory should mirror your garrysmod directory; the only folders you should have are materials, models, sound, maps, and maybe resource and scripts. Make sure your FastDL only contains those folders; that means take everything out of addon folders and put them in those. Also, don’t send lua, text, or database files.

  2. In your resource.AddFile file, take out the .bz2 extension. Also, since it mirrors your garrysmod/ directory, the sound path should be a full path. Ex.


resource.AddFile("sound/sound_fasalpha/cstm/attach.wav")

Ahhh, right, didn’t think of that, thank you for your help.

Follow up question; can I bzip the server addons and have them still work?

What do you mean? Every individual file has to be BZipped, folders won’t work if they are BZipped.

The addons on the actual server. Serverside Addons.

If I bzip them to match the ones on the web server, will the serverside addons still work?

Also, to mirror the addons on the actual server, do I have to reupload them all unbzipped?

Yes

I assume you mean yes to the latter?

Okay, I have done what code_gs originally suggested and now it prompts for download.

I have uploaded a bzipped weapon pack to my actual server and mirrored the paths and got this from the console.

HTTP ERROR
http://37.187.238.239/fastdl/garrysmod/materials/fasalpha_materials/models/weapons/shells/m27link.vmt.bz2.bz2

I’m going to delete the bzipped content on the actual server and reupload it as standard. I’ll re-mirror the paths and see if it works, if not, I’ll reupload unzipped content to the webserver and in theory, my problem should be solved, I’ll mark the thread as solved if it is a success.

Okay, so having a bzipped map on the web server and having it uncompressed on the game server works fine.

Why doesn’t this work for addons?

It won’t search the addon folder. It will only search the folders I listed above.

Yeah.

I unpacked the the weapon pack on the web server into mentioned folders and mirrored them exactly to the ones on the game server, but it’s still not working.

So should I unpack the ones on the game server too?

The ones on the game server shouldn’t be in .bz2 format; only the ones on the FastDL server have to be packed.

They were not originally, but I can only get it to prompt to download the files when the gameserver files are bzipped.

[editline]9th June 2014[/editline]

Okay, I think I have located the problem.

Whenever I move the resource.lua file into the lua/autorun/server, it changes all the directories from “sound/sound_fasalpha/cstm/attach.wav” too “sound_fasalpha/cstm/attach.wav.bz2”

Does it matter where I place the resource.lua file? I read somewhere a while back that placing it in lua/autorun/server is irrelevant as it will run anyway, is this true?

[editline]9th June 2014[/editline]

Do I have some evil pixel-fairy trying to destroy my server?

Because that’s the only explanation I can come up with for this level of voodoo.

[editline]9th June 2014[/editline]

Do I have to have the weapon pack in the garrys mod directory as well as being in the addons for this to work?

Okay so my resource.lua file looks like this.

resource.AddFile(“models/fasalpha_models/weapons/w_glock20.sw.vtx”)
resource.AddFile(“models/fasalpha_models/weapons/w_smg_biz.dx90.vtx”)
resource.AddFile(“models/fasalpha_models/weapons/w_m3.dx80.vtx”)
resource.AddFile(“models/fasalpha_models/weapons/w_ak47.mdl”)

Both my web server and game server mirror this path.

The content on my game server is unzipped whilst the content on my web server is bzipped.

Why isn’t this prompting for download?