GetFileText(path[]){
new File:file, text[256]; // Increase if file is big.
file = fopen(path);
fread(file,text,sizeof(text));
fclose(file);
return text;
}
Path is a path to the file you're reading, which must be placed in "scriptfiles" folder of your server dir or one of its subfolders.
GetFileText("test.txt") will return contents of "SERVER_DIR/scriptfiles/test.txt".
GetFileText("players/noob.inf") will return contents of "SERVER_DIR/scriptfiles/players/noob.inf".
etc
P.S. Don't name threads like "help me" or "why did I fail". Mentioning your problem in thread's name helps other people to find solution if they have the same problem instead of making then create duplicate threads.