Load file & check words?
#1

(Sry for bad English)
I've created a command with which I can write words in a file.
Now I want to load these words under OnGameModeInit and check in OnPlayerText.
But how?xD
Reply
#2

pawn Код:
new file[100];
format(file, sizeof(file),"badwords.txt");
new File:badword = fopen("badwords.txt", io_append);
if(badword)
{
    if(strfind(text[], file, true) != -1)
    {
        SendClientMessage(playerid, COLOR_RED,"That word is not allowed");
        return 0;
    }
}
Add that on OnPlayerText, not sure if it works
Reply


Forum Jump:


Users browsing this thread: