11.09.2011, 06:37
But now i do with mysql,and i try to do it myself:
But this is not work...
pawn Код:
new Query[ 100 ];
format(Query,sizeof(Query),"SELECT `Exp` FROM `playerdata` ORDER BY `Exp` DESC LIMIT %d", ReturnUserCount());
mysql_query(Query);
mysql_store_result();
new ID,tmpStr[64];
while(mysql_retrieve_row())
{
ID ++;
new scorevariable[5];
mysql_fetch_field_row(scorevariable, "Exp");
format(tmpStr, sizeof(tmpStr), "Your position is %d with %d XP",ID,strval(scorevariable));
}
mysql_free_result();
ShowPlayerDialog(playerid, 8, DIALOG_STYLE_MSGBOX, "players top10", tmpStr, "OK", "");
return 1;
}