SA-MP Forums Archive
Text Filter / STRFIND - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Text Filter / STRFIND (/showthread.php?tid=144353)



Text Filter / STRFIND - Kyle - 26.04.2010

I have this code at the top for a ANTI Swear word thing.

pawn Код:
new Filter[][] =
{
    "hacker",
    "haxx",
    "hax",
    "cheater",
    "cheat",
    "hacks",
    "speed hack"
};
And this under onplayertext.

pawn Код:
if(strfind(text,Filter,true) != -1 ) return 0;
I get errored saying Error 048: array dimensions do not match


Re: Text Filter / STRFIND - Jefff - 26.04.2010

Код:
for(new d; d<sizeof(Filter); d++)
	if(strfind(text,Filter[d],true) != -1 )
		return 0;