MySQL error
#1

What's wrong here? And if someone knows the solution, can you please post the code?

PHP код:
CMD:listip(playeridparams[])
{
    new 
query[200], ip[30]; 
    if(
PlayerInfo[playerid][Admin] < 3) return SendErrorMessage(playerid"You are not authorized to use that command.");
    if(
sscanf(params"s[30]"ip)) return SendClientMessage(playeridCOLOR_LIGHTBLUE"[USAGE]: {FFFFFF}/listip [ip address]");
    
mysql_format(Databasequerysizeof query"SELECT * FROM `players` WHERE IP LIKE '%e'"ip);  
    
mysql_tquery(Databasequery"IPAddressQuery""s"ip);
    return 
1;
}
forward IPAddressQuery(playeridip);
public 
IPAddressQuery(playeridip)
{
    if(!
cache_num_rows()) return SendClientMessageEx(playeridCOLOR_LIGHTBLUE"Accounts with that IP Address were not found.");
    new 
string[128], Name[32];
     
    for(new 
icache_num_rows(); i++)
    { 
        
cache_get_value_name(i"Username"Name);
        
format(stringsizeof(string), "Found '%s' with the same IP Address"Name);
        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
    }
    return 
1;

The command does not work, it just doesn't send a message when i do /listip 127.0.0.1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)