How to format OnPlayerText
#7

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
PHP код:
new InvalidWords[][100] =
{
     
"idiot",
     
"stupid",
     
"fuck",
     
"ass",
     
"lick",
     
"suck",
     
"dick",
     
"pussy",
     
"cum",
     
"sperm",
     
"gay"
};
public 
OnPlayerText(playeridtext[])
{
        new 
string[128];
        for(new 
cnt 0cnt sizeof(InvalidWords); cnt++)
        {
        if(
strfind(textInvalidWords[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
Reply


Messages In This Thread
How to format OnPlayerText - by RichKiez - 27.04.2018, 05:53
Re: How to format OnPlayerText - by Dutheil - 27.04.2018, 06:04
Re: How to format OnPlayerText - by RichKiez - 27.04.2018, 06:08
Re: How to format OnPlayerText - by Dutheil - 27.04.2018, 06:11
Re: How to format OnPlayerText - by RichKiez - 27.04.2018, 06:14
Re: How to format OnPlayerText - by Zeus666 - 27.04.2018, 06:18
Re: How to format OnPlayerText - by RichKiez - 27.04.2018, 06:23
Re: How to format OnPlayerText - by Dutheil - 27.04.2018, 06:25
Re: How to format OnPlayerText - by RichKiez - 27.04.2018, 06:30
Re: How to format OnPlayerText - by std - 27.04.2018, 06:34

Forum Jump:


Users browsing this thread: 1 Guest(s)