09.01.2012, 00:40
How do I make anti swear, I mean I got to the OnPlayerText, but I dont get it how to get like GetPlayerText or something
new antiswear[50];
if(strfind(antiswear, "Fuck", true) != -1 || strfind(antiswear, "Bitch", true) != -1)
{
SendClientMessage(playerid,-1,"No swearing sir");
return 0;
}
This might help you (By Ryder`):
http://forum.sa-mp.com/showpost.php?...postcount=1071 |
replaceSwear(text, badWords[i]); |
stock replaceSwear(string[], badWord[], replace = '*')
{
new
i
;
while((i = strfind(string, badWord, true)) != -1)
{
for(new x = (i + strlen(badWord)); i != x; ++i)
{
string[i] = replace;
}
}
return 1;
}