Models not Downloading (FastDL)

I host a server with FastDL, and I’m trying to get custom player models in as two of my jobs. These files are called the Metro 2033 Rangers, which I got off garrysmod.org (Sorry if I shouldn’t put links). The problem is, I put them all in the right place, and they never download, leaving me with an ERROR sign ingame. They work on singleplayer, it’s just downloading for the FastDL won’t work. I’ve had a few of my friends try to help me, editing things like the init.lua, creating a downloads.lua file as well, but never of them worked. I haven’t had someone experienced in Lua help me with this yet, so if you can help, please PM me and hopefully we can use teamviewer.

on the actual server theres a file in {root}/cfg/ called server.cfg you need to add the sv_downloadurl in there

also if you put all the files in the right place it would work (unless you havent told it to download from that url)

Could you copypast there your downloads.lua? Using sv_downloadurl or not, it should download all the files, so there’s probably something wrong with resource.AddFile.

A friend of mine fixed it, but now the Materials are all pink and black checkers, and we’re all out of ideas. Anything?

This is a common problem where the FastDL server does not load the material / model files from you addon folder. All you need to do is to copy the material, model, sounds or what ever folders from the addon to your server’s root Garry’s Mod directory, where the material, model etc… folders are. Then upload the files to the FastDL server and then it should work.

I have this same problem… but i use this instead of resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.dx80.vtx” ) any idea what i’m doin wrong?

resource.AddSingleFile( “models/vehicles/vigilante8/Clyddrive1.dx80.vtx” )
resource.AddSingleFile( “models/vehicles/vigilante8/Clyddrive1.dx90.vtx” )
resource.AddSingleFile( “models/vehicles/vigilante8/clyddrive1.mdl” )
resource.AddSingleFile( “models/vehicles/vigilante8/Clyddrive1.phy” )
resource.AddSingleFile( “models/vehicles/vigilante8/Clyddrive1.sw.vtx” )
resource.AddSingleFile( “models/vehicles/vigilante8/clyddrive1.vvd” )
resource.AddSingleFile( “models/vehicles/vigilante8/Mothdrive1.dx80.vtx” )
resource.AddSingleFile( “models/vehicles/vigilante8/Mothdrive1.dx90.vtx” )
resource.AddSingleFile( “models/vehicles/vigilante8/mothdrive1.mdl” )
resource.AddSingleFile( “models/vehicles/vigilante8/Mothdrive1.phy” )
resource.AddSingleFile( “models/vehicles/vigilante8/Mothdrive1.sw.vtx” )
resource.AddSingleFile( “models/vehicles/vigilante8/mothdrive1.vvd” )
resource.AddSingleFile( “models/player/leet_police_bt.mdl” )
resource.AddSingleFile( “models/player/leet_police_bt.vvd” )
resource.AddSingleFile( “models/player/leet.xbox.vtx” )
resource.AddSingleFile( “models/player/leet.vvd” )
resource.AddSingleFile( “models/player/leet.mdl” )
resource.AddSingleFile( “models/player/leet.phy” )
resource.AddSingleFile( “models/player/Leet_Police_BT.dx80.vtx” )
resource.AddSingleFile( “models/player/Leet_Police_BT.dx90.vtx” )
resource.AddSingleFile( “models/player/Leet_Police_BT.phy” )
resource.AddSingleFile( “models/player/Leet_Police_BT.sw.vtx” )
resource.AddSingleFile( “models/player/zombie_soldier.mdl” )
resource.AddSingleFile( “models/player/zombie_soldier.dx90.vtx” )
resource.AddSingleFile( “models/player/zombie_soldier.phy” )
resource.AddSingleFile( “models/player/zombie_soldier.vvd” )

Create a File Called: FastDL.lua ( in: lua/autorun/server)

inside the FastDL File add:

[lua]
if SERVER then
AddCSLuaFile( “FastDL.lua” ) – The name of this lua.

resource.AddFile(“sound/tank.mp3”) – Example File
resource.AddFile(“sound/ServerSound.mp3”) – Example File

end
[/lua]

for your models puppy:
**( REMEMBER TO CREATE THE FastDL.lua File Inside ( garrysmod/lua/autorun/server/ )
**
[lua]

if SERVER then
AddCSLuaFile( “FastDL.lua” ) – The name of this lua.

resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.dx80.vtx” )
resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.dx90.vtx” )
resource.AddFile( “models/vehicles/vigilante8/clyddrive1.mdl” )
resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.phy” )
resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.sw.vtx” )
resource.AddFile( “models/vehicles/vigilante8/clyddrive1.vvd” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.dx80.vtx” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.dx90.vtx” )
resource.AddFile( “models/vehicles/vigilante8/mothdrive1.mdl” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.phy” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.sw.vtx” )
resource.AddFile( “models/vehicles/vigilante8/mothdrive1.vvd” )
resource.AddFile( “models/player/leet_police_bt.mdl” )
resource.AddFile( “models/player/leet_police_bt.vvd” )
resource.AddFile( “models/player/leet.xbox.vtx” )
resource.AddFile( “models/player/leet.vvd” )
resource.AddFile( “models/player/leet.mdl” )
resource.AddFile( “models/player/leet.phy” )
resource.AddFile( “models/player/Leet_Police_BT.dx80.vtx” )
resource.AddFile( “models/player/Leet_Police_BT.dx90.vtx” )
resource.AddFile( “models/player/Leet_Police_BT.phy” )
resource.AddFile( “models/player/Leet_Police_BT.sw.vtx” )
resource.AddFile( “models/player/zombie_soldier.mdl” )
resource.AddFile( “models/player/zombie_soldier.dx90.vtx” )
resource.AddFile( “models/player/zombie_soldier.phy” )
resource.AddFile( “models/player/zombie_soldier.vvd” )

end

[/lua]

:slight_smile:

Sorry Coventry but that is not the proper way to do it.

All you need to do is make a file inside of lua/autorun/server/ call it whatever you want but it needs the .lua file extention. Then just copy and paste your code in there as it is:
[lua]
resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.dx80.vtx” )
resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.dx90.vtx” )
resource.AddFile( “models/vehicles/vigilante8/clyddrive1.mdl” )
resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.phy” )
resource.AddFile( “models/vehicles/vigilante8/Clyddrive1.sw.vtx” )
resource.AddFile( “models/vehicles/vigilante8/clyddrive1.vvd” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.dx80.vtx” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.dx90.vtx” )
resource.AddFile( “models/vehicles/vigilante8/mothdrive1.mdl” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.phy” )
resource.AddFile( “models/vehicles/vigilante8/Mothdrive1.sw.vtx” )
resource.AddFile( “models/vehicles/vigilante8/mothdrive1.vvd” )
resource.AddFile( “models/player/leet_police_bt.mdl” )
resource.AddFile( “models/player/leet_police_bt.vvd” )
resource.AddFile( “models/player/leet.xbox.vtx” )
resource.AddFile( “models/player/leet.vvd” )
resource.AddFile( “models/player/leet.mdl” )
resource.AddFile( “models/player/leet.phy” )
resource.AddFile( “models/player/Leet_Police_BT.dx80.vtx” )
resource.AddFile( “models/player/Leet_Police_BT.dx90.vtx” )
resource.AddFile( “models/player/Leet_Police_BT.phy” )
resource.AddFile( “models/player/Leet_Police_BT.sw.vtx” )
resource.AddFile( “models/player/zombie_soldier.mdl” )
resource.AddFile( “models/player/zombie_soldier.dx90.vtx” )
resource.AddFile( “models/player/zombie_soldier.phy” )
resource.AddFile( “models/player/zombie_soldier.vvd” )
[/lua]

If players are constantly downloading the files over and over again it means that the file path to the model is wrong or you didn’t include all the models files.

For example:


resource.AddFile( "models/player/Leet_Police_BT.dx80.vtx" )
resource.AddFile( "models/player/Leet_Police_BT.dx90.vtx" )
resource.AddFile( "models/player/Leet_Police_BT.phy" )
resource.AddFile( "models/player/Leet_Police_BT.sw.vtx" )

You’re missing the .mdl of this model.

Edit:
According to the wiki:


For convenience, this function will automatically add any other files that are related to the selected one, and throw an error if it can't find them. For example, a .vmt file will automatically add the .vtf with the same name, and a .mdl file will automatically add all .vvd, .ani, .dx80.vtx, .dx90.vtx, .sw.vtx, .phy and .jpg files with the same name, with a separate error for each missing file. If you do not want it to do this, use resource.AddSingleFile.

You actually only need to make them download the .mdl file if they all have the same name.

the way that i post its a old way to do this , and WORKS :slight_smile: i use it.

That’s good but i’m just showing a simpler way of doing it. I’ll show you why I said yours is unecessary.

This is for files inside of lua/autorun/:


if SERVER then

But you have yours inside of lua/autorun/server so it already knows it’s serverside.

This:


AddCSLuaFile( "FastDL.lua" ) -- The name of this lua.

That sends a clientside portion of the autorun file to the server but we are not inside of lua/autorun we are in lua/autorun/server

I hope you can see what i’m getting at

All i did to fix my problem is i had to create a new second lua file and put it in the same spot which is the autorun/server folder. It worked after i did that so for now i’m gonna create seperate forcedownload.lua files… thats the best way i’ve come across to do it!

-Edit : nvm, a bit late-

I thought i figured it out but i tried to make all these download to the server and put them in a .lua file in autorun/server folder but it didn’t download the model is just an error ingame for the job i put it in.

resource.AddFile( “lua/autorun/daft_gold_player.lua” )
resource.AddFile( “lua/autorun/daft_silver_player.lua” )
resource.AddFile( “materials/models/daftpunk/dafthelmet.vmt” )
resource.AddFile( “materials/models/daftpunk/dafthelmets.vmt” )
resource.AddFile( “materials/models/daftpunk/dafthelmets.vtf” )
resource.AddFile( “materials/models/daftpunk/dafthelmets_n.vtf” )
resource.AddFile( “materials/models/daftpunk/dafthelmet_animation.vtf” )
resource.AddFile( “materials/models/daftpunk/dafthelmet_normal.vtf” )
resource.AddFile( “materials/models/daftpunk/dafthelms_animation.vtf” )
resource.AddFile( “materials/models/daftpunk/daft_hand.vmt” )
resource.AddFile( “materials/models/daftpunk/daft_hand.vtf” )
resource.AddFile( “materials/models/daftpunk/daft_hands.vmt” )
resource.AddFile( “materials/models/daftpunk/daft_hands.vtf” )
resource.AddFile( “materials/models/daftpunk/daft_hands_n.vtf” )
resource.AddFile( “materials/models/daftpunk/daft_hand_normal.vtf” )
resource.AddFile( “materials/models/daftpunk/daft_suit.vmt” )
resource.AddFile( “materials/models/daftpunk/daft_suit.vtf” )
resource.AddFile( “materials/models/daftpunk/daft_suit_n.vtf” )
resource.AddFile( “models/player/daftpunk/daft_gold.dx80.vtx” )
resource.AddFile( “models/player/daftpunk/daft_gold.dx90.vtx” )
resource.AddFile( “models/player/daftpunk/daft_gold.mdl” )
resource.AddFile( “models/player/daftpunk/daft_gold.sw.vtx” )
resource.AddFile( “models/player/daftpunk/daft_gold.vvd” )
resource.AddFile( “models/player/daftpunk/daft_gold.xbox.vtx” )
resource.AddFile( “models/player/daftpunk/daft_silver.dx80.vtx” )
resource.AddFile( “models/player/daftpunk/daft_silver.dx90.vtx” )
resource.AddFile( “models/player/daftpunk/daft_silver.mdl” )
resource.AddFile( “models/player/daftpunk/daft_silver.phy” )
resource.AddFile( “models/player/daftpunk/daft_silver.sw.vtx” )
resource.AddFile( “models/player/daftpunk/daft_silver.vvd” )
resource.AddFile( “models/player/daftpunk/daft_silver.xbox.vtx” )

any reason the models didn’t download?

fastdl is set up wrong

thanks for your insightful post.

I agree with boxxyy thanks for the help -__- lol

[editline]27th August 2012[/editline]

How???

this article should help