I have this and when I enter the game and test it says that the .ini file contains the user ip.. and it dosn't, it only contain "asd123 sada1231221 sdsd123".
Also when I put in the file
asd123
asd4321
and print it only says the first line, why?
PHP Code:
new Path[256];
get_configsdir(Path, charsmax(Path));
formatex(Path, charsmax(Path),"%s/%s", Path, gFileName);
if(!file_exists(Path)){
return PLUGIN_HANDLED;
}
new f = fopen(Path, "rt");
new szFileData[160];
while(!feof(f)){
fgets(f, szFileData, 50000);
trim(szFileData);
if(contain(szFileData, g_szUserIP)){
chatcolor(0, "CONTAIN IP");
return PLUGIN_HANDLED;
}
else{
chatcolor(0, "NO CONTAIN");
return PLUGIN_HANDLED;
}
}
fclose(f);