Force download problem

I’m trying to get players to download these materials for this gun pack.
Here’s what happens:
Player joins
They download the files
When in the server, those same materials that was said to be downloaded do not show up.

Here’s the autorun:



resource.AddFile( "materials/VGUI/entities/weapon_ak47_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_ak47_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_aug_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_aug_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_awp_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_awp_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_deagle_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_deagle_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_famas_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_famas_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_fiveseven_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_fiveseven_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_g3sg1_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_g3sg1_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_galil_ryno.vmt" )
resource.AddFile( "materials/VGUI/entities/weapon_galil_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_glock_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_glock_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_m3_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_m3_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_m4a1_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_m4a1_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_m249_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_m249_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_mac10_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_mac10_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_mp5navy_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_mp5navy_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_p90_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_p90_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_p228_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_p228_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_scout_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_scout_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_sg550_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_sg550_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_sg552_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_sg552_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_tmp_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_tmp_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_ump45_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_ump45_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_usp_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_usp_ryno.vtf" );
resource.AddFile( "materials/VGUI/entities/weapon_xm1014_ryno.vmt" );
resource.AddFile( "materials/VGUI/entities/weapon_xm1014_ryno.vtf" );



resource.AddFile( "resource/fonts/Cstrike.ttf" );
resource.AddFile( "materials/weapons/scopes/scope.vmt" );
resource.AddFile( "materials/weapons/scopes/scope.vtf" );

So the problem is they aren’t actually downloading the files, but when they join it says they are. If you download them manually from garrysmod.org it works fine.

  1. Hi Timmy, it’s The Prissy Bitch and I has a penor you pervert. Nice try though. Stop asking kids how hot their sister’s are because one day you are gonna meet the wrong person.

  2. Never use resource.AddFile ("") because when it gets to the .mdl and .vtf files it automatically adds the rest of the files for that type. So if you just put resource.AddFile (“file.mdl”) then it will automatically make it also download the .phy and other files for the model. Because of this auto add feature, all of the trailing files for that one .mdl or .vtf will be added under the same letter case ( capitals or lower case ). Most of the time the .mdl and .vtf files are all in lower case and the other files are mixed cases. EVERY file need to be the name and letter case in the force download script as the actual file or it will not download.

For example:

You want to force download Gun_SkIn.mdl

You put resource.Addfile (“models/weapons/gun_skin.mdl”)

This will not download the file because the G, S, and I need to be capitalized just like the file name.

To avoid any problems with force download, always use resource.AddSingleFile ("") and ALWAYS double check to make sure the file names are identical right down to the letter case.

Hope that helps, Krono