Force Download File/Folder

Firstly can i just say that i have seen the other threads on this and i have tried to follow the instructions within them but I’m still running into problems with forcing clients to download data from my server and wanted to ask for some more help.

What i need:
i need to force clients joining to download a player model ,before they run riot on the server, so that they can see my female friend who refuses to wear the default models.

What I’m doing:
I created a LUA withing Garrysmod/lua/autorun/server called ‘resource.lua’
The LUA consists of this piece of code;

resource.AddFile("addons/E3 Assassin/models/e3assassin.mdl")

(I understand that only the .mdl is needed as garrysmod will do the rest?)

The problem:
With this code in place, upon joining the server, one file is downloaded showing its progress on the progress bar but then downloading of the other files seizes and the garrysmod loading icon spins indefinitely. This is the case for other users joining my server.

Myself and my friend appreciate any help with this.

Don’t include “addons/E3 Assasin”


Maybe that will help.

you little genius you! :slight_smile:


Just to expand on this if i may;

Is the .mdl the only file to write the code for in order for people who join the server to actually see the player-model in use or is there more files to add to this line of code?

I’m asking because i tested this on my server with random people who did download around 6 files upon joining as a result of this code but still couldn’t see my player model even after restarting garrysmod and rejoining the server. I was quickly being addressed as ‘error’ which pretty much confirmed this for me. lol

Thanks for your time!

Are you using sv_downloadurl? Or perhabs the modelpath for the playermodel is not the same as that one. You need to include all the model files.

I noticed that there was another .mdl that i had missed before so i have added it to my .LUA file which now looks like this:


This results in clients seeing the shape of my character (model) but having the black and pink squares present to signify a missing texture. So I’m happy that I’ve got the model working but just need to finally add the textures to the code. I’ll update the thread on my progress as i would like this thread to be helpful to other newbies such as myself.


Can anyone help me with the textures? I’d really appreciate it.

resource.AddFile( “path/to/texture.vmt” )

If necessary (the .vtf isnt the same name as the .vmt) just do the same but with .vtf

Thanks for the reply Disseminate.

I have now added everything needed in order to see the player model in question and everything works.

Only problem now is that it takes a few weeks to join the server.
Is there any way to decrease download time? (everyone sighs ^^)

Thanks to everyone who helped me with this.
When I’ve learnt a few tricks of the trade ill consider writing a simple guide for people starting out with their first server.



Thanks themaw.

I’ve ran into some problems with ‘Fast Download’ that I’m going to make a post about in order to get some help but thanks for your repeated assistance :slight_smile: