[Ajuda] TopGangs
#1

pawn Код:
CMD:topgangs(playerid,PARAMS[])
{
    new query[1024];

    format(query,sizeof(query),"SELECT Nome, Kills FROM `gangs` ORDER BY `Kills` DESC LIMIT 10");
    mysql_store_result();

    new num, top[5][24], score[5][10], string[256];
   
    while(mysql_retrieve_row())
    {
        mysql_fetch_field_row(top[num], "Nome");
        mysql_fetch_field_row(score[num], "Kills");
        num++;
    }
   
    format(string,sizeof(string),"{FFFFFF}1є: {E6E465}%s - {FFFFFF}%i Kills\n{FFFFFF}1є: {E6E465}%s - {FFFFFF}%i Kills\n{FFFFFF}3є: {E6E465}%s - {FFFFFF}%i Kills\n{FFFFFF}4є: {E6E465}%s - {FFFFFF}%i Kills\n{FFFFFF}5є: {E6E465}%s - {FFFFFF}%i Kills\n",
    top[0], score[0],
    top[1], strval(score[1]),
    top[2], strval(score[2]),
    top[3], strval(score[3]),
    top[4], strval(score[4]));
   
    ShowPlayerDialog(playerid,9953,DIALOG_STYLE_MSGBOX,"Top 5 Gangs",string,"Fechar","");
    mysql_free_result();
    return 1;
}
Nгo ta aparecendo o nome da gang nem a quantidade de kills.

Reply
#2

format(query,sizeof(query),"SELECT Nome, Kills FROM `gangs` ORDER BY `Kills` DESC LIMIT 10");

faltou sу executar:

Код:
mysql_query(mysql, query, false);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)