Ip Ban
#19

Код:
	if(strcmp(cmd, "/banip", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		giveplayerid = strval(tmp);
		new playerip[16];
		strmid(playerip, tmp, 0, strlen(tmp));
		new string2[256];
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /banip [ip]");
			return 1;
		}
		new playa;
		if(IsStringAName(tmp))
		{
			playa = GetPlayerID(tmp);
		}
		else
		{
			playa = strval(tmp);
		}
		GetPlayerName(playa, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if (PlayerInfo[playerid][pAdmin] >= 1)
		{
			format(string, sizeof(string), "AdmCmd: %s Has been banned by %s", playerip, sendername);
			SendClientMessageToAll(COLOR_RED, string);
			format(string2, sizeof(string2), "banip %s", playerip);
			SendRconCommand(string2);
		}
		else
		{
			SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
		}
		return 1;
	}
Reply


Messages In This Thread
Ip Ban - by Schock - 01.03.2009, 14:23
Re: Ip Ban - by Mikep - 01.03.2009, 14:26
Re: Ip Ban - by Schock - 01.03.2009, 14:30
Re: Ip Ban - by Rks25 - 01.03.2009, 14:31
Re: Ip Ban - by Schock - 01.03.2009, 14:35
Re: Ip Ban - by DarkSnow - 01.03.2009, 15:44
Re: Ip Ban - by Schock - 01.03.2009, 15:45
Re: Ip Ban - by Rks25 - 01.03.2009, 15:57
Re: Ip Ban - by DarkSnow - 01.03.2009, 15:58
Re: Ip Ban - by Mikep - 01.03.2009, 21:09
Re: Ip Ban - by boylett - 01.03.2009, 21:11
Re: Ip Ban - by Mikep - 01.03.2009, 21:16
Re: Ip Ban - by MenaceX^ - 01.03.2009, 21:32
Re: Ip Ban - by Rks25 - 01.03.2009, 22:01
Re: Ip Ban - by Schock - 02.03.2009, 14:50
Re: Ip Ban - by Rks25 - 02.03.2009, 14:56
Re: Ip Ban - by Danut - 02.03.2009, 15:32
Re: Ip Ban - by Rks25 - 02.03.2009, 15:45
Re: Ip Ban - by Think - 02.03.2009, 17:20
Re: Ip Ban - by Rks25 - 02.03.2009, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)