SA-MP Forums Archive
Cop-Ban - 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)
+--- Thread: Cop-Ban (/showthread.php?tid=370395)



Cop-Ban - CROSS_Hunter - 19.08.2012

actually i want to add a cop-ban t my server so those people who keep abusing with /ticket and killing innocents can learn a lesson so any one can help?


Re: Cop-Ban - Shetch - 20.08.2012

It depends on how do you define your "Innocent" players...

You would use a warning system.

Код:
new Warnings[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
	switch(Warnings)
	{
	    case 0, 1, 2:
	    {
	    	if(GetPlayerWantedLevel(playerid) == 0 && IsPlayerCop(killerid))
			{
	    		SendClientMessage(killerid, COLOR_RED, "WARNING: Stop killing innocent people or you will be banned!");
				Warnings[killerid] = ++;
			}
	    }
	    case 3:
	    {
    		if(GetPlayerWantedLevel(playerid) == 0 && IsPlayerCop(killerid))
			{
	    		SendClientMessage(killerid, COLOR_RED, "BAN: You have killed enoug innocent people, now you are banned!");
	    		Ban(killerid);
			}
	    }
	}
	return 1;
}



Re: Cop-Ban - CROSS_Hunter - 21.08.2012

i want to ban him from being a cop not from the server actually


Re: Cop-Ban - Steven82 - 21.08.2012

Then you're going to need to have a variabled named "CopBan" or something added into whatever type of saving system you're using. We need more info on what you're using.


Re: Cop-Ban - CROSS_Hunter - 21.08.2012

what example should i give? about the system? i am using dudb.sav