Hello, today I decided to switch my server from using the slow WorkshopDL to using fastdl. To start off with I have began to “attempt” to fastdl my models but I have encountered some problems which I will list below:
For reference here is my fastdl.lua file located in (lua/autorun/server): http://pastie.org/10234730
Here is where my model files are located (Not sure if this will help at all): “materials/” folder http://i.imgur.com/f7kZGDE.png || “models/” folder http://i.imgur.com/AmI4Bmh.png
My sv_downloadurl is “http://162.255.209.131/162.255.209.131-27015/” That is my servers ip and port (Thats how Xenonservers fastdl system works)
I have spoken to their support and they aren’t really that much help tbh. So I though I would try Facepunch before continuing with them.
local AddWhitelist = {
[ "ogg" ] = true,
[ "mp3" ] = true,
[ "wav" ] = true,
[ "png" ] = true,
[ "jpg" ] = true,
[ "vtf" ] = true,
[ "vmt" ] = true,
[ "mdl" ] = true,
[ "ttf" ] = true,
[ "otf" ] = true
}
local DisabledDirectories = {
}
local DisabledFiles = {
}
local vtfs = {}
local vmts = {}
function resource.AddDirectory( directory )
local files, directories = file.Find( directory .. "/*", "MOD" )
for _, NewFile in ipairs( files ) do
local FullFile = directory .. "/" .. NewFile
if DisabledFiles[ FullFile ] then continue end
local name = string.Explode( ".", NewFile, false )[1]
local extension = string.GetExtensionFromFilename( NewFile )
if ( not AddWhitelist[ extension ] ) then continue end
if ( extension == "vmt" ) then
vmts[ name ] = true
elseif ( extension == "vtf" ) then
table.insert( vtfs, name )
continue
end
resource.AddFile( FullFile )
end
for _, vtf in ipairs( vtfs ) do
if ( vmts[ vtf ] ) then
continue
else
resource.AddFile( directory .. "/" .. vtf .. ".vtf" )
end
end
for _, NewDirectory in ipairs( directories ) do
local FullDirectory = directory .. "/" .. NewDirectory
if DisabledDirectories[ FullDirectory ] then continue end
resource.AddDirectory( directory .. "/" .. NewDirectory )
end
end
MsgN( "[FastDL] Adding sounds" )
resource.AddDirectory( "sound" )
MsgN( "[FastDL] Adding materials" )
resource.AddDirectory( "materials" )
MsgN( "[FastDL] Adding models" )
resource.AddDirectory( "models" )
MsgN( "[FastDL] Adding fonts" )
resource.AddDirectory( "resource/fonts" )
Note that it will not add addon folders due to the nature of file.Find and the fact that it would cause insane amounts of things from mounted games to be added. On your sv_downloadurl – since it is obfuscated and I cannot view it, are all the files in .bz2 format?
I added the code you told me to into the fastdl.lua file located in lua/autorun/server. Now the server isn’t starting up. Here is some log I took from the console http://pastie.org/private/o4lecswv9b70ulat9i9fsg
That didn’t seem to change anything. I did add the “[ “materials/spawnicons” ] = true” into the whitelist and I was able to join my server, but still the same with the model textures and etc…
Edit: Forget what I said above when I said it worked when I put [ “materials/spawnicons” ] = true in the Whitelist. Turns out I forgot to put a , in the listing above it.
That’s the thing, I cannot join my server. When I use the script you gave me my server seems to loop when starting up and I cannot join it because it isn’t able to start up.