09.12.2013, 17:08
Try to debug
and show here my prints, if still try limit 0,3 and if still try new string[1024];
pawn Код:
COM(aka)
{
new id;
if(sscanf(params,"u",id) && id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"USAGE: /aka [playerid]");
new query[125],ip[16],hash[64],name[24];
GetPlayerIp(id,ip,sizeof(ip));
format(query,sizeof(query),"SELECT * FROM iprecords WHERE name = '%s' OR ip = '%s' ORDER BY time DESC LIMIT 0,30",NAME(id),ip);
print(query);
new DBResult:result = db_query(database,query);
printf("db_num_rows: %d",db_num_rows(result));
new string[5012];
do
{
db_get_field_assoc(result,"name",name,sizeof(name));
db_get_field_assoc(result,"ip",ip,sizeof(ip));
db_get_field_assoc(result,"hash",hash,sizeof(hash));
format(string,sizeof(string),"%sName: {FFFF00}%s{FFFFFF} | IP: {FFFF00}%s{FFFFFF} | Hash: {FFFF00}%d{FFFFFF}\n",string,name,ip,udb_hash(hash));
}
while(db_next_row(result));
db_free_result(result);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"Also Known As (Latest 30 results)",string,"Close","");
return 1;
}