Range Ban Command
#5

Use this great function by MySan
Code:
stock RangeBan(playerid)
{
new pos, oldpos, ip[15], ip2[15], tmp[21];

GetPlayerIp(playerid, ip, sizeof(ip));

pos = strfind(ip, ".", true);
pos++;

for(new i = 0; i < pos; i++)
{
ip2[i] = ip[pos-pos+i];
}

pos--;

ip[pos] = ' ';

oldpos = pos;
oldpos++;

pos = strfind(ip, ".", true);
pos++;

for(new i = oldpos; i < pos; i++)
{
ip2[i] = ip[pos-pos+i];
}

format(ip2, sizeof(ip2), "%s*.*", ip2);
format(tmp, sizeof(tmp), "banip %s", ip2);

SendRconCommand(tmp);
return ip2;
}
Reply


Messages In This Thread
Range Ban Command - by BP13 - 27.01.2010, 16:37
Re: Range Ban Command - by [MWR]Blood - 05.03.2010, 11:24
Re: Range Ban Command - by BP13 - 06.04.2010, 22:02
Re: Range Ban Command - by woot - 07.04.2010, 00:17
Re: Range Ban Command - by YmOn - 07.04.2010, 00:18

Forum Jump:


Users browsing this thread: 1 Guest(s)