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);
}
}
__________________