Bad words replacing by something else.. - 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: Bad words replacing by something else.. (
/showthread.php?tid=177357)
Bad words replacing by something else.. -
Seven. - 17.09.2010
I wanna create when someone says a world like the F word. It will display this in chat:
Seven: [0]: Cows give milk and that rules soo bad..
Re: Bad words replacing by something else.. -
Mike_Peterson - 17.09.2010
this already has been asked on this forum, try searching
i thought also an filterscript for it.
Re: Bad words replacing by something else.. -
Hiddos - 17.09.2010
COWS R AWESOME AND CUTEEEEEEEEEEEEEEEEEEEEE <33333333333333333333333333333333333333333333333 33
On-topic: Use strfind, like:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(strfind(text, "fuck", true) != -1) //-1 < If the text IS found in the string
{
SendPlayerMessageToAll(playerid, "Cows are freaking awesome you weirdo!");
return 0;
}
Just an example,
www.wiki.sa-mp.com/wiki/strfind
Re: Bad words replacing by something else.. -
Seven. - 17.09.2010
Well. I already did this... And i never post here without trying things myself.
EDIT: Thanks Hiddos <3
EDIT 2: It's not showing my ID, and solutions?
Re: Bad words replacing by something else.. -
Hiddos - 17.09.2010
Ow lol:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(strfind(text, "fuck", true) != -1) //-1 < If the text IS found in the string
{
new string[128]; format(string, sizeof string, "[%d]: Cows are freaking awesome you weirdo!");
SendPlayerMessageToAll(playerid, string);
return 0;
}
return 1;
}
Re: Bad words replacing by something else.. -
Mike_Peterson - 17.09.2010
Quote:
Originally Posted by Seven.
Well. I already did this... And i never post here without trying things myself.
EDIT: Thanks Hiddos <3
EDIT 2: It's not showing my ID, and solutions?
|

ur one of the many ill change my signature
my signature has two __________ lines

i know u aint a noob