Cop-Ban
#1

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

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;
}
Reply
#3

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

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.
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)