custom banlist
#1

I like to create my own banlist.
the bans will save in a .txt file, it's better than the samp.ban because for every ban i must also reload it with /reloadbans what is dumb since the remote console isn't in the client anymore..
My question now: How can I do that it also kicks him when his ip is range banned?

In file (or for test in the script): 127.0.*.*
player ip: 127.0.0.1

(as example)

my code (in OnPlayerConnect) works with the code below, it searches for the same ip I have:

pawn Код:
if(!strcmp(IP[0],"127",false) && !strcmp(IP[1],"0",false) && !strcmp(IP[2],"0",false) && !strcmp(IP[3],"1",false))
    {
        new string[128];
        format(string,sizeof(string),"Your IP: %s is range banned!",str);
        SendClientMessage(playerid,_COLOR_RED,string);
        Kick(playerid)
    }
but with that, it doesn't work anymore (range ban):

pawn Код:
if(!strcmp(IP[0],"127",false) && !strcmp(IP[1],"0",false) && !strcmp(IP[2],"*",false) && !strcmp(IP[3],"*",false))
    {
        new string[128];
        format(string,sizeof(string),"Your IP: %s is range banned!",str);
        SendClientMessage(playerid,_COLOR_RED,string);
        Kick(playerid)
    }
please help.
Reply


Messages In This Thread
custom banlist - by Ribber - 26.12.2010, 15:17
Re: custom banlist - by WillyP - 26.12.2010, 15:19
AW: custom banlist - by Ribber - 26.12.2010, 15:24
Re: custom banlist - by WillyP - 26.12.2010, 15:27
AW: custom banlist - by Ribber - 26.12.2010, 15:30
Re: custom banlist - by WillyP - 26.12.2010, 15:34
AW: custom banlist - by Ribber - 26.12.2010, 15:40
Re: custom banlist - by WillyP - 26.12.2010, 15:40
AW: Re: custom banlist - by Ribber - 26.12.2010, 15:46
Re: custom banlist - by WillyP - 26.12.2010, 15:49

Forum Jump:


Users browsing this thread: 2 Guest(s)