Banning an IP script
#1

Hello, does anyone know why my command to ban an IP doesn't work. My ban command works perfectly, but the player just joins with another name. Can any of you take a quick look at it an tell me what I can add to actually ban the IP an keep it banned until someone unbans it. I would appreciate it alot.. Thanks in advanced

Heres the code:

Код:
CMD:banip(playerid, params[])
{
	if(IsPlayerConnected(playerid)) {
	    new string[128], tmp[32];
		if(sscanf(params, "s[32]", tmp)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /banip [ip]");
		if(PlayerInfo[playerid][pAdmin] >= 1337) {
			AddBan(tmp);
			format(string, sizeof(string), "AdmCmd: %s has banned IP:%s", GetPlayerNameEx(playerid), tmp);
			ABroadCast(COLOR_RED,string,2);
		} else {
  			SendClientMessage(playerid, COLOR_GRAD2, "   You are not authorized to use that command !");
		}
	}
	return 1;
}
Reply


Messages In This Thread
Banning an IP script - by Josh_Main - 09.06.2013, 12:57
Re: Banning an IP script - by Aly - 09.06.2013, 13:00
Re: Banning an IP script - by Vince - 09.06.2013, 13:00
Re: Banning an IP script - by Josh_Main - 09.06.2013, 13:12
Re: Banning an IP script - by Josh_Main - 09.06.2013, 13:37

Forum Jump:


Users browsing this thread: 1 Guest(s)