30.12.2010, 04:09
I don't. It returns 0 right after it closes it. Ending the loop. And if you want to complain about indentations...
pawn Код:
public OnPlayerText(playerid, text[])
{
new
string[64],
File:forbiddenwords = fopen("ForbiddenWords.txt", io_read);
while(fread(forbiddenwords, string))
{
if(!strcmp(string,text))
{
SendClientMessage(playerid, 0xFFFFFFF, "That word is forbidden!!!");
fclose(forbiddenwords);
return 0;
}
}
fclose(forbiddenwords);
return 1;
}