using strfind- but CAPS Bug is a problem!

ok first trying to prevent from words being used, seeing how this is very small
and usefull script, but lately i been getting buggers using CAPS like GAY, FAG,etc

how can i make it detect any word with or with out CAPS...
thanks in advanced <3

[partial coding but yea- SendErrMsg is a custom message function so ignore this, since it works fine.]
{ // Advanced String of block#2
		new gay = strfind(text,"gay");
		new fag = strfind(text,"fag");
		new jew = strfind(text,"jew");
		if(gay != -1 || fag != -1 || jew != -1)
			SendErrMsg(playerid," You cannot use that word, it is not allowed in this server.");
			return 0;


particularly: ignorecase=false Ignore capitals if true.

sorry but i cannot understand wiki like that without example

lol.. just change the strfind lines at the end. Like this:

pawn Код:
new gay = strfind(text,"gay",true);
new fag = strfind(text,"fag",true);
new jew = strfind(text,"jew",true);
See that I added ',true' which will check for CAPITALS now too

Jew is a curse for you?

Why is jew a curse? stupid nazi.

Originally Posted by OmeRinG
Why is jew a curse? stupid nazi.
i said " partial coding " meaning there is more words, just not added here to reduce spam text
shut up plz?

and thanks for example, i asked a question and i posted an answer that someone asked for, i think i balanced today's need for knowledge.

thanks guys!

Forum Jump:

Users browsing this thread: