Little help :s
#1

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?
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;
}
Reply


Messages In This Thread
Little help :s - by FireCat - 08.09.2011, 18:16
Re: Little help :s - by =WoR=Varth - 08.09.2011, 18:22
Re: Little help :s - by JaTochNietDan - 08.09.2011, 18:23
Re: Little help :s - by FireCat - 08.09.2011, 18:27
Re: Little help :s - by FireCat - 08.09.2011, 20:18
Re: Little help :s - by iPLEOMAX - 08.09.2011, 20:44
Re: Little help :s - by FireCat - 08.09.2011, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)