Server Force Download Model?

I recently tried to put a playermodel on my sandbox server but its just showing up as an error.

I put a resources.lua in (lua/autorun/server) but it’s still not making the model download.


resource.AddFile("/players/lebron/Lebron_James.dx80.vtx")
resource.AddFile("/players/lebron/Lebron_James.dx90.vtx")
resource.AddFile("/players/lebron/lebron_james.mdl")
resource.AddFile("/players/lebron/Lebron_James.phy")
resource.AddFile("/players/lebron/Lebron_James.sw.vtx")
resource.AddFile("/players/lebron/lebron_james.vvd")
resource.AddFile("/players/lebron/Lebron_James.xbox.vtx")

Any idea what I did wrong?

All the files are relative to the garrysmod directy and models automatically include those extra files so you’d need to do resource.AddFile(“models/players/lebron/lebron_games.mdl”)

I changed the path to models/ but it’s still not downloading?

Try this,


resource.AddFile("models/players/lebron/Lebron_James.dx80.vtx")
resource.AddFile("models/players/lebron/Lebron_James.dx90.vtx")
resource.AddFile("models/players/lebron/lebron_james.mdl")
resource.AddFile("models/players/lebron/Lebron_James.phy")
resource.AddFile("models/players/lebron/Lebron_James.sw.vtx")
resource.AddFile("models/players/lebron/lebron_james.vvd")
resource.AddFile("models/players/lebron/Lebron_James.xbox.vtx")

If that doesn’t work you have the files in the wrong location.
Also don’t forget to make it download the materials for the model as well.

Edit: Didnt read over Chessnut’s post all the way :s
I repeated the same thing.
Sorry ><

firstly move the script back a folder to just autorun (lua/autorun) and add this to the end of the code:


 AddCSLuaFile("name of the script.lua") -- change this to your scripts name .lua

Hope this works :stuck_out_tongue: