Quote:
Originally Posted by KiLLeR.
Post your code, probably something is wrong with it cuz it must work with contain.
|
Here's the reading part.
PHP Code:
new szFile[256]
get_configsdir(szFile, charsmax(szFile))
add(szFile, charsmax(szFile), "/maps.ini")
new iFile = fopen(szFile, "r")
while (!feof(iFile))
{
fgets(iFile, szMapName, charsmax(szMapName))
trim(szMapName)
if (szMapName[0] == EOS || szMapName[0] == '/' || szMapName[0] == '[' || szMapName[0] == ']' || szMapName[0] == ';')
continue;
if (equal(sMap, szMapName), strlen(sMap) && is_map_valid(szMapName))
{
i++;
client_print(id, print_console, "%i. %s", i, szMapName);
}
}
client_print(id, print_chat, "* A complete list of %d matching maps will be displayed in your console.", i)
fclose(iFile);