Quote:
Originally Posted by Zeus666
PHP код:
new InvalidWords[][100] =
{
"idiot",
"stupid",
"fuck",
"ass",
"lick",
"suck",
"dick",
"pussy",
"cum",
"sperm",
"gay"
};
public OnPlayerText(playerid, text[])
{
new string[128];
for(new cnt = 0; cnt < sizeof(InvalidWords); cnt++)
{
if(strfind(text, InvalidWords[cnt], true) != -1)
{
Kick(playerid);
}
}
return 1;
}
|
I do not want to kick players out of the server. I just want to reformat the forbidden word into ****.
example:
fuck to ****
ass to ***
pussy to *****
and the length of the * sign corresponds to the forbidden character.
Example:
- I can fuck you
To: I can **** you