27.02.2011, 16:12
lets say you search for a player file, than you use some pattern for like like PlayerName.txt
or you got some maps and dont know if the map exist
or just tell me why you need to search in a folder for some random files?
If you want to create a command which list all registered players as example
Than you only need to create an extra file which stores all names
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
strcat(name, ".txt", MAX_PLAYER_NAME);
if(fexist(name)) {}
pawn Код:
new name[16];
format(name, sizeof name, "Map_%d.txt", mapid);
if(fexist(name)) {}
If you want to create a command which list all registered players as example
Than you only need to create an extra file which stores all names