Problem[bad words]
#9

You shouldn't put the check inside the loop, it will be called x times, it only needs to be called once.

pawn Код:
if(GetPlayerState(playerid) == 1) // onfoot
{
    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;
        }
    }
}
Also, please use [pawn] tags instead of php. And learn to indent.
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: 3 Guest(s)