Question about y_ini. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question about y_ini. (
/showthread.php?tid=334614)
Question about y_ini. -
Shetch - 15.04.2012
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.
Re: Question about y_ini. -
ReneG - 15.04.2012
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...
}