SA-MP Forums Archive
Changing Written text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Changing Written text (/showthread.php?tid=246990)



Changing Written text - wheelman_WM - 07.04.2011

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.


Re: Changing Written text - Calgon - 07.04.2011

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.


Re: Changing Written text - wheelman_WM - 07.04.2011

Thnx Done xD


Re: Changing Written text - wheelman_WM - 07.04.2011

oh shit now its showing like this
nub : fuck

Changed to
Awesome Server
Nub : Fuck


Re: Changing Written text - HyperZ - 07.04.2011

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;
    }
}



Re: Changing Written text - wheelman_WM - 07.04.2011

Thnx


Re: Changing Written text - Calgon - 07.04.2011

Because this is the Script Requests topic, Clive.