simply adds all of the contents(just files) of a folder to the download table...requires sdktools.
Code:
stock AddFolderToDownloadTable(const String:Directory[], bool:recursive=false)
{
decl String:FileName[64], String:Path[512];
new Handle:Dir = OpenDirectory(Directory), FileType:Type;
while(ReadDirEntry(Dir, FileName, sizeof(FileName), Type))
{
if(Type == FileType_Directory && recursive)
{
FormatEx(Path, sizeof(Path), "%s/%s", Directory, FileName);
AddFolderToDownloadTable(FileName);
continue;
}
if (Type != FileType_File)
continue;
FormatEx(Path, sizeof(Path), "%s/%s", Directory, FileName);
AddFileToDownloadsTable(Path);
}
return;
}
hi sawce
__________________