Question about y_ini.
#1

Hey guys!

So i'm making a dynamic faction system, and i'm having problems with reading files. What i'm trying to do is so when the filterscript starts, it would get all the files from a single folder and store the information in a variable (enum). The problem is that i don't know how can i get file names from a folder. For example i create a faction called "Bloods".The server creates a file called 'Bloods.ini' in my scriptfiles folder. I restart the server. And make the server search for all the files in my scriptfiles folder and open the 'bloods.ini' file.
Reply
#2

Some things like this I reckon

pawn Код:
new path[128];
for(new i=0;i<MAX_FACTION;i++)
{
    format(path,sizeof(path),"Faction_%d",i) // it will loop through all the faction files
    INI_ParseFile(path, // etc...
}
Reply


Forum Jump:


Users browsing this thread: