Thread: Download Prob!
View Single Post
Author Message
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 05-03-2009 , 05:36   Download Prob!
Reply With Quote #1

I got a little bit of trouble with files to download.
The readfile doesn´t seems to work cause there is only one file downloaded by file.
Any suggestions how about to fix this?

Code:
public OnMapStart()
{
    new String:file[256];
    BuildPath(Path_SM, file, 255, "configs/downloads.ini");
    new Handle:fileh = OpenFile(file, "r");
    new String:buffer[256];
    while (ReadFileLine(fileh, buffer, sizeof(buffer)))
    {
        new len = strlen(buffer)
        if (buffer[len-1] == '\n')
            buffer[--len] = '\0';
        if (FileExists(buffer))
        {
            AddFileToDownloadsTable(buffer);
        }
        if (IsEndOfFile(fileh))
            break;
    }
 
    for (new i = 0; i < 6; i++)
    {
        PrecacheModel(g_modelAmerName[i], true);
        PrecacheModel(g_modelAxisName[i], true);
    }
}
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline