MYSQL TOP `X` Players Dialog Example???
#6

I will try this Thx! REP++

EDIT: and if i want to order by score and money?

I made this but have some bugs Can Fix this?

pawn Код:
CMD:top(playerid, params[])
{
    new playerData[512], clanname[MAX_PLAYER_NAME], string[512], clankills;
    mysql_query("SELECT `clanname`, `clankills` FROM `clans` ORDER BY `clankills`");
    mysql_store_result();
    while(mysql_retrieve_row())
    {
        mysql_fetch_row(playerData);
        sscanf(playerData, "p<|>s[512]d", clanname, clankills);
        // do something with 'playersName' and 'playersScore'
        format(string, sizeof(string), "%s\n"R"Clan: %s"W"Kills: %d", string, clanname, clankills);
        //SendClientMessage(playerid, ~1, string);
        ShowPlayerDialog( playerid, 1, DIALOG_STYLE_MSGBOX,"Location: Top Clans", string, "(Close)", "");
    }
    mysql_free_result();
    return 1;
}
Reply


Messages In This Thread
MYSQL TOP `X` Players Dialog Example??? - by nGen.SoNNy - 10.05.2012, 13:11
Re: MYSQL TOP `X` Players Dialog Example??? - by nGen.SoNNy - 10.05.2012, 13:31
Re: MYSQL TOP `X` Players Dialog Example??? - by Vince - 10.05.2012, 13:34
Re: MYSQL TOP `X` Players Dialog Example??? - by nGen.SoNNy - 10.05.2012, 13:51
Re: MYSQL TOP `X` Players Dialog Example??? - by SuperViper - 10.05.2012, 14:25
Re: MYSQL TOP `X` Players Dialog Example??? - by nGen.SoNNy - 10.05.2012, 14:32

Forum Jump:


Users browsing this thread: 4 Guest(s)