How to unban?
#1

How do I unban someone from using this command?
Код:
COMMAND:ban(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 3)
	{
	    new adminname[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],otherplayerid, reason[128];
	    GetPlayerName(otherplayerid,pname,sizeof(pname));
	    GetPlayerName(playerid,adminname,sizeof(adminname));
	    if(sscanf(params, "us", otherplayerid, reason))
	        SendClientMessage(playerid, COL_GREY, "/ban [PlayerID/PlayerName] [Reason]");
		else if(otherplayerid == INVALID_PLAYER_ID)
		    SendClientMessage(playerid, COL_GREY, "This player is not connected!");
		else
		{
			new string[32];
			format(string, sizeof(string), "You have been banned by %s! Reason: %s", adminname, reason);
			SendClientMessage(otherplayerid, 0xAAAAAAAA, string);
			Ban(otherplayerid);
		}
	}
	else
	{
	    SendClientMessage(playerid, 0xAAAAAAAA, "You are not the required level admin!");
	}
	return 1;
}
Reply


Messages In This Thread
How to unban? - by Vic1990 - 27.11.2011, 07:26
Re: How to unban? - by Joshb93 - 27.11.2011, 07:37
Re: How to unban? - by Lorenc_ - 27.11.2011, 07:43
Re: How to unban? - by Joshb93 - 27.11.2011, 07:46
Re: How to unban? - by .:Kaos:. - 27.11.2011, 08:41

Forum Jump:


Users browsing this thread: 4 Guest(s)