rangeban
#1

pawn Код:
stock isPlayerRangebanned(playerid)
{
    new string[81];
    Format(string, "SELECT * FROM `rangebanned` WHERE `ipaddress` = '%s'", splitip(PlayerIP(playerid)));
    mysql_query(string);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        mysql_free_result();
        return 1;
    }
    mysql_free_result();
    return 0;
}
how can i edit this to it check more ip?

now:

if your ip = 192.168.1.1
Then splitip return 192.168*
And if your rangebanned it will return "true" and give u ban message where isPlayerRangebanned

if ip 192.168* is banned, and a playe with ip 192.167.1.1 (return 192.167*) join, then it will return "false" and no ban message so i want it to loop like:

(-10 and +10)
Loop this ip: 192.168*

192.158*
192.159*
.....
.....
192.166*
192.167*
192.168*
192.169*
192.170*
.....
.....
192.174*
192.178*

if ip loaded from mysql mach with some of the looped ips then it will return true
Reply


Messages In This Thread
rangeban - by Unknown123 - 09.11.2011, 19:14
Re: rangeban - by MP2 - 09.11.2011, 19:20
Re: rangeban - by Unknown123 - 09.11.2011, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)