hi all
i think even some advanced scripters wont know that, but, i will show you some of the 2 systems ive made
the anti insult works like that: if like anyone types a abusing word example "monfuck" it detects the "fuck" and kicks them 100% tested even if they type "you fucker" it detects "fuck" and kicks them. Here is the code
This is the anti insult system
Put this under onplayertext
[pawn]public OnPlayerText(playerid, cmdtext[])//you may have OnPlayerText(playerid) change it to OnPlayerText(playerid, cmdtext)
CheckInsult(playerid, cmdtext);[/pawn]
Make a public CheckInsult(playerid, c[])
[pawn] new cde[256]; cde = "CountRegisters";
if (strfind(c, "fuck", true) != -1 || strfind(c, "*****", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
if (strfind(c, "******", true) != -1 || strfind(c, "bullshit", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
if (strfind(c, "ass", true) != -1 || strfind(c, "stupid", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
if (strfind(c, "gay", true) != -1 || strfind(c, "sexy", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
return 0;[/pawn]
this is the anti-clancheat system
Put this under public OnPlayerCommandText(playerid, cmdtext)
[pawn]
public OnPlayerCommandText(playerid, cmdtext)
if (strcmp(cmd, "clan", true) == 0) {
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (IsLevel(playerid,6)) return 0;//Change IsLevel(playerid,6) to what you use to check if player is a admin
else if (!strlen(tmp)) SendClientMessage(playerid, GREEN,"ERROR: Invalid Syntax - Use /c %s <playerid/name>.",cmdtext);
else {
if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid, GREEN,"ERROR: Unknown player."); else {
pInfo[plr][ClanUSA] = 1;//Change it to what you use as PlayerInfo
}
}
return 1;
}[/pawn]
Put this under OnPlayerSpawn(playerid,classid,teamid)
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
if (pInfo[playerid][ClanUSA] = 0) {
NickPlayerChar(playerid);
}[/pawn]
Make a public NickPlayerChar(playerid)
[pawn]public NickPlayerChar(playerid)
{
if(IsInClan(gPlayers[playerid]))
{
SendClientMessage(playerid, COLOR_RED, "CONNECTION REJECTED");
SendClientMessage(playerid, COLOR_RED, "YOU HAVE BEEN KICKED");
SendClientMessage(playerid, COLOR_RED, "ADMIN: SYSTEM REASON: NOT IN CLAN USA");
Kick(playerid);
SendClientMessageToAll(playerid, COLOR_RED, "Admin System kicked %s. Reason: Not in clan USA",gPlayers[playerid]);
}
}[/pawn]
Now make a public IsInClan(c)
[pawn]public IsInClan(c[])
{
new cde[256]; cde = "CountRegisters";
if (strfind(c, "USA", true) != -1) return 1;//Replace USA with your clan
else return 0;
return 1;
}[/pawn]
Now here you have them. Now you have a insult-free and clancheat-free server!
You might have some warnings, but ignore them its tested 100% works