23.02.2011, 08:43
how would i make it so if you say **CK in the chatbox it just sends you a msg saying "no swearing"
thanks
and i dnt wanna use filterscripts
thanks
and i dnt wanna use filterscripts
![Cheesy](images/smilies/biggrin.png)
public OnPlayerText(playerid, text[]){
if(!strcmp(bitch, text, true, 8) || !strcmp(asshole, text, true, 8) || !strcmp( text, true, 6)!strcmp(cunt, text, true, 8)){
SendClientMessage(playerid,colour,"no swearing");
return 0;
}
return 1;
}
i belive its something like
pawn Код:
|
new SwearWords[] = {
"Fuck",
"Bitch"
};
public OnPlayerText(playerid, text[])
{
for(new i; i < sizeof(SwearWords); i++)
{
if(strfind(text, SwearWords[i], true) != -1) // IF you want SwearWords not to be case sensitiv change ' true ' to ' false '
{
SendClientMessage(playerid, COLOR_RED, "Please don't swear.");
return 0;
}
}
return 1;
}