18.08.2015, 14:43
I try to make this command,but the result is not right..
Код:
COMMAND:topmoney(playerid, params[]) { new p_top[24],money,string[600],row[600]; mysql_query("SELECT playerName, playerMoney FROM playerdata ORDER BY playerMoney DESC Limit 10"); mysql_store_result(); while( mysql_fetch_row(row) ) { sscanf(row, "p<|>s[600]d",p_top,money); format(string, sizeof string, "%s {FFFFFF}Nickname: %s {FF0000}|| {00D5FF}Money: %d\n", string, p_top,money); } mysql_free_result(); ShowPlayerDialog(playerid, 108, DIALOG_STYLE_MSGBOX,"Top Players", string, "Close", ""); return 1; }