27.03.2012, 09:00
So as the title says i dont know how to randomly read from files that are located in scriptfiles.
So for example in scriptfiles i have like: File1.ini, File2.ini and File3.ini
Something like this, hope i explained well. Please help.
So for example in scriptfiles i have like: File1.ini, File2.ini and File3.ini
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[128];
if (strcmp("/load", cmdtext, true, 10) == 0)
{
format(string, sizeof(string), "%s.ini");
new rand = random(string);
fopen(string, io_read);
{
/* etc */
}
}
return 0;
}