08.09.2011, 18:16
I have a function DisableBadWord found in a thread in filter script section.
If I have under OnPlayerText DisableBadWord("fuck"); and a player types fuck it will send ****
But I have a var to store words but when he types a word that is in that var it doesn't send ****
It sends the word
Why?
If I have under OnPlayerText DisableBadWord("fuck"); and a player types fuck it will send ****
But I have a var to store words but when he types a word that is in that var it doesn't send ****
It sends the word

Why?
pawn Код:
public OnPlayerText(playerid, text[])
{
for(new j = 0; j < ForbidenWordsLoaded; j++)
{
DisableBadword(ForbidenWords[j]);
}
return 1;
}
pawn Код:
function LoadForbidenWords()
{
new File:handle = fopen("FAdmin/Logs/Forbidenwords.txt", io_read),word[32],i = 0;
while(fread(handle, word))
{
if(i >= sizeof(ForbidenWords))
{
printf("Warning: Could not load more than %d words. Destination array is too small!",sizeof(ForbidenWords));
break;
}
strcpy(ForbidenWords[i], word);
printf("%s",ForbidenWords[i]);
i++;
}
ForbidenWordsLoaded = i;
fclose(handle);
printf("Words loaded: %d", ForbidenWordsLoaded);
return 1;
}