01.11.2011, 14:51
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\
Again, +rep to the guy who help me.
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;
}