Changing Written text
#1

One More Help Plz

I want that when a players say fuck
his text will be chnaged to awesome server

Example

Nub : Fuck chnaged to
Nub : Awesome


And also a anti advertisement code.
Reply
#2

You can use strfind in OnPlayerText and OnPlayerCommandText.

If you're looking for exact code for this, post in the Script Requests Thread, or search.
Reply
#3

Thnx Done xD
Reply
#4

oh shit now its showing like this
nub : fuck

Changed to
Awesome Server
Nub : Fuck
Reply
#5

On Top:
pawn Код:
new CensoredWords[1][] = {
    "fuck"
};
OnPlayerText:
pawn Код:
for(new i; i < sizeof(CensoredWords); i++)
{
    if(strfind(text,CensoredWords[i],true) != -1)
    {
        // bla bla bla
        new PlayerName[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        format(string,sizeof(string), "%s: Awesome Server", PlayerName);
        SendClientMessageToAll(GetPlayerColor(playerid), string);
        return 0;
    }
}
Reply
#6

Thnx
Reply
#7

Because this is the Script Requests topic, Clive.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)