08.08.2013, 02:48
pawn Код:
stock GetRandomMap()
{
new file[64];
new i = 0, count = 0, Maps[MAX_MAP_FILES];
for( ; i != MAX_MAP_FILES; ++i)
{
format(file,sizeof(file), "/Maps/%d.ini", i);
if(fexist(file))
{
Maps[count] = i;
count++;
}
else return printf("[NOTICE] File Bugged.");
}
NextMapSet = Maps[random(count)];
return 1;
}