Read the wiki about file functions, it should help you.
Once you understand how they work, you need to use a few string functions:
-strcmp: you will need to check if the line starts with "SetPlayerMapIcon(playerid,"
-a modified version of strtok, that will fetch your data basing on the comas (",") instead of the blanks
Like cynic said, every scripter has his habits when it comes to deal with files, and it's not easy to explain how it works if you haven't tried anything by yourself. There are systems that are more efficient than others though.
I myself use a system that consists in skipping all lines that don't start with the awaited pattern (for your case it's "SetPlayerMapIcon(playerid,"), with the help of strcmp. Then I start extracting every number using the function similar to strtok(string,idx) and I store every of these numbers in a var. Once I got all the numbers, I use the awaited function (in your case, SetPlayerMapIcon) with the help of all those vars that were holding the different vallues.
Just one thing: you'll need a loop. Dunno if it's explained in the wiki, but to go through each line you'll need to use something like that:
Код:
while (fread(ReadFile,line))
{
// Process the content of "line" here
}
It's up to you to develop your own method to read through files.