resource.AddFile Help

Hey guys, Jelly Pancake here asking some help with my server.

I was recently playing on my server and one of my moderators mentioned I had a gigantic ERROR on me. I told them I was using the jihad bomb swep.

Then I asked some other people and they said I had an ERROR too and when they bought the Jihad in the traitor shop they get error too.

I looked in my autorun folder for the resources file and it looks like it should all work, but I asked around and it turns out NO ONE is downloading anything when they join.

I tried adding extra lines like if SEVER then and such, but it still doesn’t work

It’s been doing this with EVERY single addon I’ve added to my server, and it’s really pissing me off.

jihad_resources.lua in garrysmod/lua/autorun


--AutoDL the jihad shtuff :3

--snds
resource.AddFile( "sound/siege/jihad.wav" );
resource.AddFile( "sound/siege/big_explosion.wav" );

--icon
resource.AddFile( "materials/vgui/entities/weapon_jihadbomb.vtf" );
resource.AddFile( "materials/vgui/entities/weapon_jihadbomb.vmt" );

--model
resource.AddFile( "models/weapons/v_jb.mdl" );
resource.AddFile( "models/weapons/v_jb.dx80" );
resource.AddFile( "models/weapons/v_jb.dx90" );
resource.AddFile( "models/weapons/v_jb.sw.vtx" );
resource.AddFile( "models/weapons/v_jb.vvd" );
resource.AddFile( "models/weapons/w_jb.mdl" );
resource.AddFile( "models/weapons/w_jb.dx80" );
resource.AddFile( "models/weapons/w_jb.dx90" );
resource.AddFile( "models/weapons/w_jb.sw.vtx" );
resource.AddFile( "models/weapons/w_jb.vvd" );
resource.AddFile( "models/weapons/w_jb.phy" );

--materials

--vmodel
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb1.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb1.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb1_planted.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb1_ref.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb2.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb2.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb3b.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb3b.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/and.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/hand.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_04.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_04.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_45.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_45.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_active.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_active.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_off.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_off.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_off_ref.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_on.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_on.vtf" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/screen_on_ref.vtf" );

--wmodel

resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/bomb1.vmt" );
resource.AddFile( "materials/models/weapons/v_models/pr0d.c4/bomb1_planted.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/bomb2.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/bomb3b.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/hand.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/screen_04.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/screen_45.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/screen_active.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/screen_on.vmt" );
resource.AddFile( "materials/models/weapons/w_models/pr0d.c4/screen_off.vmt" );

--Das all.

[editline]18th March 2015[/editline]

Some extra info, I also tried putting the materials and models in the root of my game C:\GModServer\garrysmod and it still doesn’t work.

I’m using srcds

Is your webserver setup correctly?
Delete your download folder in the root of your garrysmod folder on your computer and reconnect.

Post console logs when connecting.

I tried that and they said that when they connect to the server they get a download and it’s long but they still claim there’s an error in game. I added you on Steam to discuss it.

Post your web server link and put that file in lua/autorun/server

Server setup: https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/setting_up_a_server_with_steamcmd.lua.html

FastDL: https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/fastdl_setup_instructions.lua.html – Read trouble-shooting… It is possible to have FastDL download a file into a completely wrong directory so it’ll download once but won’t be seen, and other issues too…

And, if you want a recursive / automatic system that adds all content ( and addons in addons folder ) then use this ( It covers how to add the content [ in gamemodes/gmname/content/* ] and everything else ): https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/setting_up_downloads_using_recursive_resource_system.lua.html – you simply install the files where it says and it’ll handle everything else…