08-29-2011, 11:50 PM
(This post was last modified: 08-29-2011, 11:54 PM by ELEXTRIX32.)
Hey guys.
Well i have been experimenting with Fast-Dl lately ,but i can't seem to make it download my models and materials.
I have this code :
function AddDir(dir) // recursively adds everything in a directory to be downloaded by client
local list = file.FindDir("../"..dir.."/*")
for _, fdir in pairs(list) do[/code]
if fdir != ".svn" then // don't spam people with useless .svn folders
AddDir(dir.."/"..fdir)
end
end
for k,v in pairs(file.Find("../"..dir.."/*")) do
resource.AddFile(dir.."/"..v)
end
end
AddDir("models/Humans/Group02")
AddDir("materials/models/Humans/female/Group02")
AddDir("materials/models/Humans/male/Group02")
Well i placed it in ; garrysmod\lua\autorun But idk if that is correct if someone could inform me how to name it and where to place it, i would appreciate it .
EDIT: Also im using this for GMOD.
Well i have been experimenting with Fast-Dl lately ,but i can't seem to make it download my models and materials.
I have this code :
function AddDir(dir) // recursively adds everything in a directory to be downloaded by client
local list = file.FindDir("../"..dir.."/*")
for _, fdir in pairs(list) do[/code]
if fdir != ".svn" then // don't spam people with useless .svn folders
AddDir(dir.."/"..fdir)
end
end
for k,v in pairs(file.Find("../"..dir.."/*")) do
resource.AddFile(dir.."/"..v)
end
end
AddDir("models/Humans/Group02")
AddDir("materials/models/Humans/female/Group02")
AddDir("materials/models/Humans/male/Group02")
Well i placed it in ; garrysmod\lua\autorun But idk if that is correct if someone could inform me how to name it and where to place it, i would appreciate it .
EDIT: Also im using this for GMOD.