18.09.2010, 00:42
(
Последний раз редактировалось Kyosaur; 18.09.2010 в 11:02.
)
This will only replace ONE instant of the swear words, so if you say something like "bitch bitch" only the first bitch will actually be filtered; You can fix this by turning your strfind if statement into a while loop.
With all the loops needed by this function, it would probably be a better idea to just do something like this:
This is more of a snippet though.
With all the loops needed by this function, it would probably be a better idea to just do something like this:
pawn Код:
for(new i=0; i<sizeof(badWords); i++)
{
if(strfind(text,badWords[i], true) != -1)
{
SendClientMessage(playerid, red, "Do you kiss your mom with that mouth!?");
return 0;
}
}