Little problem
#1

so can anyone let me know whats the problem with this


Basically it doesnt work, if you ban someones IP it will still let them play normaly. The check doesnt work
PHP код:
new myIP[16];
    
GetPlayerIp(playeridmyIPsizeof(myIP));
    if(
IPBanned(myIP)) {
        
Kick(playerid);
        return 
true;
    }
IPBanned(const str[])
{
    new 
query[85],Cache:result,rows;
    
mysql_format(mysqlquerysizeof(query), "SELECT `IP` FROM `ipbanned` WHERE `IP` = '%e' LIMIT 1",str);
    
result mysql_query(mysqlquery);
    if((
rows cache_num_rows()))
    {
        
rows cache_get_row_int(00);
        
cache_delete(result);
        return 
rows;
    }
    
cache_delete(result);
    return 
rows;

Reply


Messages In This Thread
Little problem - by Squirrel - 23.01.2016, 17:35
Re: Little problem - by K0P - 23.01.2016, 17:44
Re: Little problem - by Squirrel - 23.01.2016, 17:45
Re: Little problem - by Prokill911 - 23.01.2016, 19:27
Re: Little problem - by Squirrel - 23.01.2016, 19:27
Re: Little problem - by Prokill911 - 23.01.2016, 19:34
Re: Little problem - by Squirrel - 23.01.2016, 19:38
Re: Little problem - by Squirrel - 24.01.2016, 01:04
Re: Little problem - by CoaPsyFactor - 24.01.2016, 01:36
Re: Little problem - by BroZeus - 24.01.2016, 07:35

Forum Jump:


Users browsing this thread: 1 Guest(s)