Cand vad "Cache:" -ul ala ma iau durerile de cap...
CMD:uratii(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] <= 4) return 1;
new gQuery[0] = (EOS);
mysql_format(SQL, gQuery, sizeof gQuery, "SELECT * FROM `urati` ORDER BY `id` DESC");
mysql_tquery(SQL, gQuery, "arataUratii", "d", "playerid");
return 1;
}
function arataUratii(playerid)
{
if(cache_get_row_count() == 0) return SCM(playerid, -1, "Nu am gasit nici un urat in baza de date.");
new id, nick[32], idjoc, string[512];
for(new i = 0; i < cache_num_rows(); i++)
{
id = cache_get_field_content_int(i, "id");
getString(i, "NUME", nick, SQL, 128);
idjoc = cache_get_field_content_int(i, "IDJOC");
format(string, sizeof string, "%d -> %s -> %d\n", id, nick, idjoc);
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Lista cu urati", string, "Ok", "");
return 1;
}