• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Help!Restrict player chat
#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


Messages In This Thread
Help!Restrict player chat - by Jian_han - 2021-07-18, 05:16 AM
RE: Help!Restrict player chat - by Radical - 2021-07-18, 07:40 AM
RE: Help!Restrict player chat - by Jian_han - 2021-07-18, 10:00 AM

Forum Jump: