SA-MP Forums Archive
[Tutorial] Word filter - 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: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Word filter (/showthread.php?tid=553482)



Word filter - CodeStyle175 - 30.12.2014

Word filter

Код:
public OnPlayerText(playerid, text[])
{
	new b_word[][20]={"fuck","pussy","drugs"};//Bad word array
        for(new i=0; i < sizeof(b_word); i++) if(strfind(text,b_word[i],true)!=-1)//Loop for checking bad words.
		return SendClientMessage(playerid,-1,"Sentence consisted bad words");//Message
	return 1;
}



Re: Word filter - Cyber123 - 30.12.2014

good work


Re: Word filter - Vince - 30.12.2014

This is a snippet. In a tutorial you are expected to explain the code in detail.


Re: Word filter - Luicy. - 30.12.2014

Not even a tutorial lol.


Re: Word filter - Diti1 - 30.12.2014

Lool