Top x players using sqlite problem
#3

pawn Код:
CMD:topstat(playerid,params[])
{
    SendClientMessage(playerid,COLOR_GREEN,"Top X Y'ers");
    new DBResult:result, a, string[128], exp[20];
    format(string,sizeof(string),"SELECT `Username`, `EXP` FROM `users` ORDER BY `EXP` DESC LIMIT 5");
    result = db_query(Database,string);
    if(db_num_rows(result))
    {
        do
        {
            db_get_field(result,0,string,25);
            db_get_field(result,1,exp,sizeof(exp));
            format(string,sizeof(string),"%d. %s Stat: %s",++a,string,exp);
            SendClientMessage(playerid,COLOR_ORANGE,string);
        }
        while(db_next_row(result));
    }
    db_free_result(result);
    return 1;
}
Reply


Messages In This Thread
Top x players using sqlite problem - by Cerealguy - 14.01.2015, 14:18
Respuesta: Top x players using sqlite problem - by Cerealguy - 14.01.2015, 16:08
Re: Top x players using sqlite problem - by Jefff - 14.01.2015, 17:23
Respuesta: Re: Top x players using sqlite problem - by Cerealguy - 14.01.2015, 18:59

Forum Jump:


Users browsing this thread: 1 Guest(s)