mysql check ban
#7

This is my ban check, take a look over it.

PHP код:
//This is on playerconnect
    
new query[200], ip[16];
     
GetPlayerName(playeridpnamesizeof pname);
     
GetPlayerIp(playeridip16);
    
format(querysizeof(query), "SELECT * FROM `Banned` WHERE `User` LIKE '%s' OR `IP` LIKE '%s' LIMIT 1"pnameip);
     
mysql_query(query);
     
mysql_store_result();
    if(
mysql_num_rows() >= 1)
     {
        
format(querysizeof(query), "UPDATE `Banned` SET IP='%s' WHERE `User` LIKE '%s'"ippname);
        
mysql_query(query);
        
SendClientMessage(playeridCOLOR_SILVER"You are banned from this server");
        
TogglePlayerControllable(playerid0);
        
Kick(playerid);
     }
    
mysql_free_result(); 
Reply


Messages In This Thread
mysql check ban - by Ricop522 - 27.01.2012, 15:35
Re: mysql check ban - by Ricop522 - 28.01.2012, 01:55
Re: mysql check ban - by Scenario - 28.01.2012, 01:57
Re: mysql check ban - by MP2 - 28.01.2012, 01:59
Re: mysql check ban - by Ricop522 - 28.01.2012, 02:57
Re: mysql check ban - by MP2 - 28.01.2012, 03:01
Re: mysql check ban - by Bogdan1992 - 28.01.2012, 07:23
Re: mysql check ban - by Ricop522 - 28.01.2012, 23:09
Re: mysql check ban - by Ricop522 - 01.02.2012, 02:11

Forum Jump:


Users browsing this thread: 2 Guest(s)