02.10.2018, 13:35
Quote:
Код:
new str[200], name[MAX_PLAYER_NAME], DBResult: result = db_query(db_open("Top.db"), "SELECT `Name`,`Kills` FROM `Players` ORDER BY `Kills` DESC limit 10"); for (new a, rows = db_num_rows(result); a < rows; a++) { db_get_field(result, 0, name, sizeof(name)); format(str, sizeof(str), "%d. %s - Kills: %d\n", a + 1, name, db_get_field_int(result, 1)); ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Top Rich List", str , "Exit", ""); db_next_row(result); } |
Then the result will be like this
Код:
10. GameOvr - Kills; 5 (Only shows the last one because it is 10th dialog)
I was waiting for a long time