Author Topic: Anti-Insult For Server Protection By Doom  (Read 4 times)

Offline (R2x)spider

  • Administrator
  • Newbie
  • *****
  • Posts: 30
    • View Profile
Anti-Insult For Server Protection By Doom
« on: February 03, 2013, 05:35:13 pm »
top of script
Code: [Select]
#define MAX_WORD_LEN 18 // Max lenght of a swear word
#define MAX_WORDS 122   // Max amount of swearwords
#define MAX_SWEARCOUNT 5 // Max warnings before kick
Code: [Select]
new swear[][MAX_WORD_LEN] =
{
{"anus"},
{"****"},
{"ass"},
{"****"},
{"blowjob"},
{"boner"},
{"bullshit"},
{"clit"},
{"****"},
{"cum"},
{"****"},
{"dick"},
{"dildo"},
{"douche"},
{"fag"},
{"fellatio"},
{"****"},
{"fudgepacker"},
{"gay"},
{"damn"},
{"gooch"},
{"handjob"},
{"hard-on"},
{"homo"},
{"homodumbshit"},
{"humping"},
{"jerkoff"},
{"jigaboo"},
{"jizz"},
{"jungle-bunny"},
{"junglebunny"},
{"kooch"},
{"kootch"},
{"kunt"},
{"kyke"},
{"lesbian"},
{"lesbo"},
{"lezzie"},
{"mcfagget"},
{"minge"},
{"mothafucka"},
{"motherfucker"},
{"motherfucking"},
{"muff"},
{"muffdiver"},
{"munging"},
{"negro"},
{"*****"},
{"niglet"},
{"nutsack"},
{"paki"},
{"panooch"},
{"pecker"},
{"peckerhead"},
{"****"},
{"****"},
{"polesmoker"},
{"pollock"},
{"poonani"},
{"porchmonkey"},
{"prick"},
{"punanny"},
{"punta"},
{"pussies"},
{"****"},
{"pussylicking"},
{"puto"},
{"queef"},
{"renob"},
{"rimjob"},
{"ruski"},
{"sand******"},
{"****"},
{"scrote"},
{"****"},
{"shiz"},
{"shiznit"},
{"skank"},
{"skullfuck"},
{"****"},
{"slutbag"},
{"smeg"},
{"snatch"},
{"tard"},
{"testicle"},
{"thundercunt"},
{"tit"},
{"twat"},
{"twatwaffle"},
{"unclefucker"},
{"vag"},
{"****"},
{"vjayjay"},
{"wank"},
{"****"},
{"whorebag"},
{"whoreface"},
{"wop"},
{"@gmail"},
{"@live"},
{"@msn"},
{"@hotmail"},
{".de"},
{".cc"},
{"www."},
{".com"},
{".co"},
{".uk"},
{".org"},
{".net"},
{".info"},
{".tk"}
};
Code: [Select]
public OnPlayerText(playerid, cmdtext[])
{
if((strlen(cmdtext) < 3) || (cmdtext[0] == '/') || (cmdtext[0] == '#') || (cmdtext[0] == '!')) return 1;

new offset;
new len;
  for(new i=0; i<MAX_WORDS; i++)
{
offset = strfind(cmdtext, swear[i], true);
if(offset > -1)
{
len = strlen(swear[i]);
if(len < 3) break;
for(new y=0; y<len; y++)
{
cmdtext[offset+y] = '*';
}
swearCount[playerid]++;
new string[64];
format(string, sizeof(string), "Swearing is not allowed here, warning %d/%d", swearCount[playerid], MAX_SWEARCOUNT);
SendClientMessage(playerid, 0xE60000FF, string);
    if(swearCount[playerid] >= MAX_SWEARCOUNT)
{
    new name[24];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "*** %s has been kicked for offensive language", name);
    SendClientMessageToAll(0xE60000FF, string);
    Kick(playerid);
    break;
}
break;
}
}
return 1;
}

Need Help To Install Free To Ask

Share on Bluesky Share on Facebook