14.10.2012, 13:17
Hi guys ![Smiley](images/smilies/smile.png)
I want to make a top with best 10 players by time played on server.
and the thread:
It showing the players with played time between 9 and 10 hours
![Smiley](images/smilies/smile.png)
I want to make a top with best 10 players by time played on server.
Код:
CMD:otime( playerid, params[ ] ) return mysql_query( "SELECT * FROM `Accounts` ORDER BY `Online` DESC LIMIT 10", THREAD_SHOW_TOP_ACTIVE, playerid );
Код:
mysql_store_result( ); if ( !IsPlayerConnected( extraid ) ) return mysql_free_result( ); gsString[ 0 ] = EOS; new p_I = 1, p_Name[ 11 ][ 24 ], p_Online[ 11 ][ 10 ] ; while( mysql_retrieve_row( ) ) { mysql_get_field( "Name", p_Name[ p_I ] ); mysql_get_field( "Online", p_Online[ p_I ] ); format( gsString, 1024, "%s{FF0000}%d{FFFFFF}) Name: {FFFF00}%s {FFFFFF}| Online Time: {FFFF00}%s\n", gsString, p_I, p_Name[ p_I ], p_Online[ p_I ] ); p_I++; } mysql_free_result( ); format( gsString, sizeof gsString, "%s\n\n{00FF00}The best players of this server are here!\n\ Regards for these names!", gsString ); ShowPlayerDialog( extraid, DIALOG_EMPTY, DIALOG_STYLE_MSGBOX, "{FFFFFF}Top {FF0000}10 {FFFFFF}Active Users", gsString, "Ok", "" ); return 1;
![Sad](images/smilies/sad.gif)