Problem[bad words]
#6

You could use an array of bad words:

pawn Код:
new gBadWords[][] = {
"fuck",
"shit",
"bitch"
// etc.
};
public OnPlayerText(playerid, text[])
{
    for(new i=0; i<sizeof(gBadWords); i++)
    {
        if(strfind(text, gBadWords[i], true) != -1)
        {
            ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0, 0);
            return 0;
        }
    }
    return 1;
}
Not tested/compiled, let me know if it has any errors.
Reply


Messages In This Thread
Problem[bad words] - by Dan_Barocu - 22.04.2012, 02:24
Re: Problem[bad words] - by MP2 - 22.04.2012, 02:29
Re: Problem[bad words] - by Dan_Barocu - 22.04.2012, 02:35
Re: Problem[bad words] - by MP2 - 22.04.2012, 02:36
Re: Problem[bad words] - by Dan_Barocu - 22.04.2012, 02:46
Re: Problem[bad words] - by MP2 - 22.04.2012, 02:53
Re: Problem[bad words] - by Dan_Barocu - 22.04.2012, 03:01
Re: Problem[bad words] - by Dan_Barocu - 22.04.2012, 03:08
Re: Problem[bad words] - by MP2 - 22.04.2012, 15:52

Forum Jump:


Users browsing this thread: 1 Guest(s)