I forgot something
#2

You've missed quite a lot here.

1) You've not included the appropriate variables for the OnPlayerText callback: playerid and text
2) strcmp requires the 2 parameters be enclosed in the function in the if statement, and you need to use quotation marks to contain the message
3) strcmp isn't a wise choice for this, I suggest usage of strfind instead.

Here's the working code:

pawn Код:
public OnPlayerText(playerid, text[]) {
    if(strfind(text, "fuck admin", true) != -1) {
        Ban(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
I forgot something - by Cjgogo - 25.04.2011, 09:07
Re: I forgot something - by Calgon - 25.04.2011, 09:16

Forum Jump:


Users browsing this thread: 1 Guest(s)