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
#2

This looks like it's from lvrcr. The admin level is 1337 but why do you check if their admin level doesn't equal zero?
Reply
#3

to make sure lower level admins aren't using it? I've had admins on my server hack before, which is why I have 'trial' admins at a lower level.

Try putting your conditionals in parentheses '(' ')'
i.e.
pawn Код:
if((GetPlayerWeapon(i) == 38) || (GetPlayerWeapon(i) == 16))
Reply
#4

Well in this gm, unless he's changed it, admin level is 1337. But I don't get why he checks if the player is not admin, then checks if the player is not non-admin.
Reply
#5

Ah, I see what you mean.
Reply
#6

LOL, has he just taken this out of LVRCR 1.8?
Reply
#7

can you not read? I added 3 teams, not admins, just teams with permissions ( canuseneo, canusesmith, canuseagent) and i want them to use these weapons without getting autobanned

the reason why i leave ifplayeradminlevel == 1337 is because i dont want OTHER players to be able to use these weapons unless adminlevel == 1337 or gteam = team_Agent|| gteam = team_smith || gteam == team_neo


yes its lvrcr script.... suprised you dont know how i am..... drummer....
Reply
#8

Oh Sorry, I didn't realise, Im a nub at scripting so I can't help soz D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)