2021-07-18, 07:40 AM
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.