• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Help!Restrict player chat
#1
such as

Players are forbidden to send a message containing fu?k

Not sent fuck, but included ?f?ck?. I will thank you very much,



I am noob,pls?Please give me a complete document?

I very need it!!!!?

thank you
  Reply
#2
Code:
new Insults[][] = {

? ? {"Word"},

? ? {"Word"},

? ? {"Word"}

}



IsTextContainsInsults(const text[]) {

? ? for(new i; i < sizeof Insults; i)

? ? ? ? if(strfind(text, Insults[i], true) != -1) return 1;



? ? return 0;

}



public OnPlayerText(playerid, text[]) {



? ? if(IsTextContainsInsults(text)) {

? ? ? ? SendClientMessage(playerid, -1, "Your text has been blocked due?to contains insults.");

? ? return 0;

? ? }



? ? return 1;

}



This is a simple example of blocking?words.?

You have to block those words yourself.
  Reply
#3
thank
  Reply


Forum Jump: