So I understand that resource.AddSingleFile you are able to send any file to the client, but is there only certain file types allowed, and is there any kind of size limit? I tried sending .wav files to the client but they did not send over, so I used FastDL instead, but then some users wont get the required files for reasons idk why.
Do you have a webserver? Also, use resource.AddFile instead of SingleFile.
I do have a web server. Why must I use resource.AddFile instead?
[QUOTE=RedXVIII;46820193]I do have a web server. Why must I use resource.AddFile instead?[/QUOTE]
[code]resource.AddFile( "somemodel.mdl" )[/code]
will also add all the various .phys, .vtx, etc models associated with the .mdl file.
Make sure you're running that function serverside
These answers are not relevant to my question.
resource.AddFile adds files to a list of files that clients will request during connection if they do not already have them on their system. You have to use it regardless of if you are using FastDL or not.
Clients will request files from your FastDL URL over HTTP if you have one set through the sv_downloadurl convar, otherwise they will request the file directly from your Garry's Mod server.
The maximum file size when transferring directly from the server is dictated by the net_maxfilesize convar.
The following file extensions are blocked from being transferred. This list is specific to the next update when it is released, but is close enough to the current blacklist too.
[lua]
.cfg
.lst
.exe
.vbs
.com
.bat
.dll
.ini
.log
.lua
.db
.vdf
.smx
.gcf
.sys
[/lua]
Thank you very much, this is exactly what I needed help on.
Sorry, you need to Log In to post a reply to this thread.