BanIP help.
#3

Код:
CMD:banip(playerid, params[])
{
	if(!CheckAdmin(playerid, 1)) return NotAuthMSG(playerid);     
	new ip[128],pIP[128],string[128];
	if(sscanf(params,"s[128]",ip)) return SyntaxMSG(playerid, "/banip [IP]");
	format(string, sizeof(string),"banip %s", ip);
	SendRconCommand(string);
	SendRconCommand("reloadbans");
	format(string, sizeof(string), "AdmCmd: %s has just IP banned, %s.", GetName(playerid), ip);
	AMSG(COLOR_LIGHTRED, string);
	foreach(Player, i)
	{
		GetPlayerIp(playerid, pIP, sizeof(pIP));
		if(!strcmp(ip, pIP, true))
		{
			format(string, sizeof(string), "[SERVER]: Your IP %s, has been banned from the server.", pIP);
			KickEx(playerid, string);
		}
	}
	return 1;
}
Reply


Messages In This Thread
BanIP help. - by PaulDinam - 16.02.2013, 11:42
Re: BanIP help. - by DaRk_RaiN - 16.02.2013, 11:57
Re: BanIP help. - by PaulDinam - 16.02.2013, 14:14
Re: BanIP help. - by Mean - 16.02.2013, 15:11
Re: BanIP help. - by Scenario - 16.02.2013, 15:17
Re: BanIP help. - by RACGaming - 16.02.2013, 15:18
Re: BanIP help. - by Mean - 16.02.2013, 15:20
Re: BanIP help. - by 2KY - 16.02.2013, 15:23
Re: BanIP help. - by PaulDinam - 16.02.2013, 15:49
Re: BanIP help. - by Jefff - 16.02.2013, 16:18

Forum Jump:


Users browsing this thread: 1 Guest(s)