26.12.2010, 15:17
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:
but with that, it doesn't work anymore (range ban):
please help.
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)
}
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)
}