SA-MP Forums Archive
Admin Getting Banned with the AntiWeapon - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Admin Getting Banned with the AntiWeapon (/showthread.php?tid=103957)



Admin Getting Banned with the AntiWeapon - SkyWinder - 22.10.2009

I got this antihack but i want tit not to ban me if i am an Admin How do i do it.

if i am Rcon i should not be banned please help

Currently it even bans me if i am admin.

Код:
	if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) {
		GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
		format(string,sizeof(string),"%s has been banned by Administrator Bot [Reason: OTest ] [Date: %d/%d/%d] [Time: %d:%d]",playername,playerid,day,month,year,hour,minuite);
		SendClientMessageToAll(RED,string);
		SendClientMessage(playerid, RED, "Post an Unban Request at www.******.com" );
		printf("%s has been banned by Administrator Bot [Reason: Test ] [Date: %d/%d/%d] [Time: %d:%d]",playername,playerid,day,month,year,hour,minuite);
		Ban( playerid );
		return 0;
	}



Re: Admin Getting Banned with the AntiWeapon - yom - 22.10.2009

Just add a check with IsPlayerAdmin

if (!IsPlayerAdmin(playerid)) // if playerid is not an rcon admin


Re: Admin Getting Banned with the AntiWeapon - SkyWinder - 22.10.2009

i tried but i don't know exactly where to add it.