Okay so I use a fastdl for my server. My websync from the FTP takes addons and puts them in the main folder for me.
But I still take the materials/models folders and move them to the main Garrysmod. (These are playermodels and some weapons)
Here is an example in the autorun/lua/server of one of my resource files:
[lua]--// File Generated By Fox-Warrior's Resources Generator Version 2.04 \\--
if (SERVER) then
resource.AddSingleFile( "models/player/Karimatrix/hunter.dx80.vtx" )
resource.AddSingleFile( "models/player/Karimatrix/hunter.dx90.vtx" )
resource.AddSingleFile( "models/player/Karimatrix/hunter.mdl" )
resource.AddSingleFile( "models/player/Karimatrix/hunter.phy" )
resource.AddSingleFile( "models/player/Karimatrix/hunter.sw.vtx" )
resource.AddSingleFile( "models/player/Karimatrix/hunter.vvd" )
resource.AddSingleFile( "models/player/Karimatrix/hunter.xbox.vtx" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/erdim_facemap.vmt" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/erdim_facemap.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/erdim_facemap_n.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/eyeball_l.vmt" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/eyeball_l.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/eyeball_l_n.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/eyeball_r.vmt" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/eyeball_r.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/eyeball_r_n.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/hunter.vmt" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/hunter.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/Hunterk.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/hunterk_n.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/hunter_n.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/mouth.vmt" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/mouth.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/mouth_n.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/pupil_l.vmt" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/pupil_l.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/pupil_r.vmt" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/pupil_r.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/ì«óán »á»¬á/eyeball_l.vtf" )
resource.AddSingleFile( "materials/models/xirtamiraK/hunter/human/ì«óán »á»¬á/eyeball_r.vtf" )
end
[/lua]
Should I put this in addonname/lua/autorun ? or should I just keep moving everything to the main folder....
Why are you using resource.AddSingleFile instead of resource.AddFile ?
The LUA goes into /garrysmod/lua/autorun/server
The content must go into the /garrysmod/ mainfolder.
[QUOTE=Ideal-Hosting;35288206]Why are you using resource.AddSingleFile instead of resource.AddFile?
The LUA goes into /garrysmod/lua/autorun/server
The content must go into the /garrysmod/ mainfolder.[/QUOTE]
The content is in the main. I use AddSingleFile to stop it from adding files that dont exist and to stop people from re-downloading files all the time. The lua is in the server folder.
What exactly doesn't work?
The models. They download fine! But in-game appear as errors. I know the paths are right...
Sometimes they appear fully done for me but errors for others. They are all in the main directory and in the addons (Just in case) and there are fastdl files for all of them! in the Lua/autorun/server!
Can you call the files on the webspace via your browser?
What do you mean? Liek are they on the fastdl site? Because they are...
[editline]25th March 2012[/editline]
-- Bump -- I could really use the help!
Full console log from server startup?
Maybe the downloadtable is overfilled already...
Not seeing anything wrong. No errors or anything.
Hello Charrax,
we just finished this today:
[url]http://support.ideal-hosting.biz/index.php?/GmodEU/Knowledgebase/Article/View/3/2/start-requirements-for-garrys-mod-server-fastdl[/url]
Just go trough it and look if you can figure out any errors.
Well befre I read the article I got hte models working using:
[lua]
local ClientResources = 0;
local function ProcessFolder ( Location )
for k, v in pairs(file.Find(Location .. '*')) do
if file.IsDir(Location .. v) then
ProcessFolder(Location .. v .. '/')
else
local OurLocation = string.gsub(Location .. v, '..[B]/materials/models/humans/[/B]', '')
if !string.find(Location, '.db') then
ClientResources = ClientResources + 1;
resource.AddFile(OurLocation);
end
end
end
end
if !SinglePlayer() then
ProcessFolder('..[B]/materials/models/humans/female[/B]');
ProcessFolder('..[B]/materials/models/humans/male[/B]');
end
You just change the bold to your likings. This works for addons in the addon folder aswell. Very nice!
Sorry, you need to Log In to post a reply to this thread.