Convert R7 into R38
#2

Try this:

pawn Код:
mysql_tquery(dbHandle, "SELECT `Username`, `Scores` FROM `players` ORDER BY `Scores` DESC LIMIT 10", "OnSelectFinish", "");

forward OnSelectFinish();
public OnSelectFinish()
{
    new ID, scores, output[800], username[MAX_PLAYER_NAME];
    for(new i = 0; i < cache_get_row_count(); i++)
    {
        ID++;
        cache_get_field_content(i, "Username", username);
        scores = cache_get_field_content_int(i, "Scores");
        format(output, sizeof(output), "%s%d. %s %d Kills\n", output, ID, username, scores);
    }
    ShowPlayerDialog(playerid, DIALOG_TOPSCORES, DIALOG_STYLE_MSGBOX, "Top 10 Scorer", output, "Ok", "Back");
    return 1;
}
Didn't test so there might be bugs.
Reply


Messages In This Thread
Convert R7 into R38 - by ReD_HunTeR - 12.01.2015, 17:24
Re: Convert R7 into R38 - by PaulDinam - 12.01.2015, 17:50

Forum Jump:


Users browsing this thread: 2 Guest(s)