please help auto ban
#1

ok, I have a script that has a auto ban system that continuosly checks your weapons and bans you if you have an 'unauthorized' weapon.

I have been modding this thing for awhile now, i have everything i want working, that i can proudly say i did myself except seif, he helped me with one thing.

Well.. Now ive added 3 more teams and i have givin them special abilities. And i want them to have some of the auto-ban weapons. It checks for playeradminlevel = 1337 (admin level) but i want these teams to do it without having the admin.

At one point i got it to work, but somehow it didnt work when i sent it to the server. and now it dont work at all... so any help would be nice. thanks

Код:
public weaponanti()
{
  for (new i = 0; i < MAX_PLAYERS; i++)
 	{
	 if(IsPlayerConnected(i) && IsSpawned[i] == 1 && GetPlayerState(i) == PLAYER_STATE_ONFOOT)
	  {
    if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 16 || GetPlayerWeapon(i) == 17 || GetPlayerWeapon(i) == 18 || GetPlayerWeapon(i) == 19 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36 || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 39 || GetPlayerWeapon(i) == 4)
    {

 {
		if(PlayerAdminLevel[i] != 1337) {
		 new pname[30];
     new string[256];
     new inter;
		 inter = GetPlayerInterior(i);
     new wep = GetPlayerWeapon(i);
     GetPlayerName(i, pname, 30);
     format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r",pname,i);
     SendClientMessageToAll(0xFF7F50AA, string);
     ircSay(EchoConnection, EchoChan,string);
     SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN DETECTED AS A CHEATER/HACKER");
     SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN BANNED FROM THIS SERVER");
     SendClientMessage(i,COLOR_RED,"If you think this is a mistake.Contact an Admin to appeal this ban");
     format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r Wep:[%d] Int:[%d]",pname,i,wep,inter);
     printf("%s", string);
     if(udb_Exists(PlayerName(i)) && PLAYERLIST_authed[i]) {
 		 dUserSetINT(PlayerName(i)).("nameban",1);
  	 }
     SetPlayerInterior(i,10);
     SetPlayerPos(i,219.6257,111.2549,999.0156);
     SetPlayerFacingAngle(i,2.2339);
     SetCameraBehindPlayer(i);
     Banning[i] = 1;
     SetTimer("BanPlayer",700,0);
     
    }
   }
	}
 }
}
}

public cashanti()
when i had it working i did this.

changed
Код:
if(PlayerAdminLevel[i] != 1337) {
to this

Код:
if(PlayerAdminLevel[i] != 1337 && PlayerAdminLevel[i] != 0 || gTeam[i] == TEAM_AGENT || gTeam[i] == TEAM_SMITH || gTeam[i] == TEAM_NEO) {
apparently it will still ban you...

should i add another routine for these teams for exceptions?
any help is appreciated
Reply


Messages In This Thread
please help auto ban - by AgentE420 - 05.02.2009, 15:37
Re: please help auto ban - by [WS]Hyper - 05.02.2009, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)