24.04.2011, 03:47
if you have files with names: 1.ini , 2.ini .......n.ini
you can do this:
put your max files value
then function:
and put this function into GM init!
you can do this:
put your max files value
pawn Код:
#define MAX_FILES 100//you can add more, 100 for example
then function:
pawn Код:
stock FilesCount()
{
new fCount = 0, str[128];
for(new i=0; i<MAX_FILES; i++)
{
format(str, sizeof str,"%s.ini",i);
if(dini_Exists(str))
{
fCount++;
}
}
return printf("i have %i files",fCount);
}