HelpMe #3 [+REP] - 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)
+--- Thread: HelpMe #3 [+REP] (
/showthread.php?tid=294370)
HelpMe #3 [+REP] -
NessaHD - 01.11.2011
Hi guys, i was bored 2day, so i did open pawno, and started making a xNoSwear system. I want to do that, when a player for example type in "fuck", then it should warn the player and automatically edit the text to "f***". Could someone give a example, this is my code: /Feel free to edit the code, and do it better\
pawn Код:
public OnPlayerText(playerid, text[])
{
if(strfind(text, "fuck", true) != -1)
{
new p = strfind(text, "{cc00cc}", true);
strdel(text, p, p+8);
SendClientMessage(playerid, -1, "Dont swear, if you do it again you will be kicked!");
}
return 1;
}
Again, +rep to the guy who help me.