26.12.2010, 15:49
pawn Код:
public OnPlayerConnect(playerid)
{
new idx;
new IP[2][128];
new str[50];
GetPlayerIp(playerid,str,sizeof(str));
IP[2] = strtok(str, idx, '.');
IP[3] = strtok(str, idx, '.');
if(!strcmp(IP[2],"15",false) && !strcmp(IP[3],"25",false))
{
new string[128];
format(string,sizeof(string),"Your IP: %s is range banned!",str);
SendClientMessage(playerid,_COLOR_RED,string);
Kick(playerid);
}
return 1;
...
}