Range Banning
#1

You guys are going to get tired of seeing me. ^-^

So my issue, I have a command that kicks me and doesn't ban me. Any sugguestions?

Код:
CMD:rban(playerid, params[])
{
	LoginCheck(playerid);
	LevelCheck(playerid, 4);

	new
		str[130],
		id
	;

	if(sscanf(params, "uS(No Reason)[128]", id, params)) return SendUsage(playerid, "/rban <PlayerID> <Reason(Optional)>", "Range bans the specified player's IP.");
	if(id == INVALID_PLAYER_ID) return SendError(playerid, "Player is not connected.");
	if(id == playerid) return SendError(playerid, "You cannot ban yourself.");
	if(pInfo[playerid][Admin] < pInfo[id][Admin]) return SendError(playerid, "You cannot use this command on a higher level administrator.");
	ClearChatB(id, 100);
    format(str, sizeof(str), "{AFAFAF}%s{FF6347} has been ranged banned by [ADMIN] {AFAFAF}%s{FF6347} (Reason: {AFAFAF}%s{FF6347})", GetName(id), GetName(playerid), params);
    SendClientMessageToAll(COLOR_CHAT, str);
	format(str, sizeof(str), "You have range banned {AFAFAF}%s{FF6347} (Reason: {AFAFAF}%s{FF6347})", GetName(id), params);
	SendClientMessage(playerid, COLOR_CHAT, str);
	format(str, sizeof(str), "You have been banned by [ADMIN] {AFAFAF}%s{FF6347}", GetName(playerid));
	SendClientMessage(id, COLOR_CHAT, str);
    PlaySoundForAll(1140);
	new ip[50];
	GetPlayerIp(id, ip, 16);
    strdel(ip, strlen(ip)-4, strlen(ip));
    format(ip, sizeof(ip), "%s**.**", ip);
    format(ip, sizeof(ip), "banip %s", ip);
    SendRconCommand(ip);
    SendRconCommand("reloadbans");
    //KickDelay(id);
	SendAdm(playerid, "RBAN");
    return 1;
}
Reply


Messages In This Thread
Range Banning - by sgtph3n1x - 13.06.2014, 03:34
Re: Range Banning - by nmader - 13.06.2014, 03:40
Re: Range Banning - by sgtph3n1x - 13.06.2014, 03:51
Re: Range Banning - by nmader - 13.06.2014, 04:01
Re: Range Banning - by sgtph3n1x - 13.06.2014, 04:07
Re: Range Banning - by nmader - 13.06.2014, 04:11
Re: Range Banning - by sgtph3n1x - 13.06.2014, 04:32
Re: Range Banning - by Laure - 13.06.2014, 05:14
Re: Range Banning - by Threshold - 13.06.2014, 06:35
Re: Range Banning - by Laure - 13.06.2014, 07:38

Forum Jump:


Users browsing this thread: 1 Guest(s)