" )
+
+ new line[251], name[NAMELEN+2], players[32], num, tid, written_len
+ new ctime, cwpn, ccp, cgc, cbst
+ new btime, bwpn, bcp, bgc, bbst
+ new ctime_str[20], btime_str[20]
+
+ get_players_ordered( players, num )
+
+ for( new i = 0; i < num; i++ )
{
- new fh = fopen( SCORES_PATH, "w" )
-
- //Header-8 cols: #, name, status, time, sct/cp/gc/boost, Best, cp/gc/boost, Completed
- fprintf( fh, " " )
- fprintf( fh, "# Name Status Time Wpn/CP/GC/Bst Best ... Fin " )
- fprintf( fh, " | | " )
+ tid = players[i]
- new line[251], name[NAMELEN+2], players[32], num, tid, written_len
- new ctime, cwpn, ccp, cgc, cbst
- new btime, bwpn, bcp, bgc, bbst
- new ctime_str[20], btime_str[20]
+ get_user_name( tid, name, NAMELEN)
+ sb_add_tabs( name, NAMELEN+2 )
- get_players_ordered( players, num )
+ ctime = timer[tid][TMR_CNTTME]
+ cwpn = timer[tid][TMR_CNTWPN]
+ ccp = timer[tid][TMR_CNTCPS]
+ cgc = timer[tid][TMR_CNTGCS]
+ cbst = timer[tid][TMR_CNTBST]
+ format( ctime_str, 19, "%d/%d/%d/%d", cwpn, ccp, cgc, cbst )
+ sb_add_tabs( ctime_str, 19 )
+
+ btime = timer[tid][TMR_BSTTME]
+ bwpn = timer[tid][TMR_BSTWPN]
+ bcp = timer[tid][TMR_BSTCPS]
+ bgc = timer[tid][TMR_BSTGCS]
+ bbst = timer[tid][TMR_BSTBST]
+ format( btime_str, 19, "%d/%d/%d/%d", bwpn, bcp, bgc, bbst )
+ sb_add_tabs( btime_str, 19 )
- for(new i = 1; i <= num; i++ )
- {
- tid = players[i]
-
- get_user_name( tid, name, NAMELEN)
- sb_add_tabs( name, NAMELEN+2 )
-
- ctime = get_climber_time(tid)
- cwpn = timer[tid][TMR_CNTWPN]
- ccp = timer[tid][TMR_CNTCPS]
- cgc = timer[tid][TMR_CNTGCS]
- cbst = timer[tid][TMR_CNTBST]
- format( ctime_str, 19, "%d/%d/%d/%d", cwpn, ccp, cgc, cbst )
- sb_add_tabs( ctime_str, 19 )
-
- btime = timer[tid][TMR_BSTTME]
- bwpn = timer[tid][TMR_BSTWPN]
- bcp = timer[tid][TMR_BSTCPS]
- bgc = timer[tid][TMR_BSTGCS]
- bbst = timer[tid][TMR_BSTBST]
- format( btime_str, 19, "%d/%d/%d/%d", bwpn, bcp, bgc, bbst )
- sb_add_tabs( btime_str, 19 )
-
- formatex( line, 250,
- "%s%d %s%s %s %s%s %s%d%s",
- i % 2 ? NULLSTR : "",
- i, htmlspecialchars( name ),
- getuserstatus( tid ),
- parsetime( ctime ), ctime_str,
- parsetime( btime ), btime_str,
- timer[tid][TMR_MAPFIN],
- i % 2 ? NULLSTR : " " )
- written_len += strlen( line )
- //if( limit && written_len > ( 1263 - strlen( cust_msg ) ) ) break
- if( written_len > 1263 ) break
- fprintf( fh, line )
- }
- //1530-150-117=1263
- new cust_msg[33]
- get_pcvar_string( p_stats_msg, cust_msg, 32 )
- if( !strlen( cust_msg ) ) formatex( cust_msg, 32, "Climb %s", VERSION )
- fprintf( fh, " | | | " )
- fprintf( fh, "%s | ", cust_msg )
- fclose( fh )
- ts_score = get_systime()
- }
-
- show_motd( id, SCORES_PATH, "Current Scores" )
+ formatex( line, 250,
+ "%s%d %s%s %s %s%s %s%d%s",
+ i % 2 ? NULLSTR : "",
+ i + 1, htmlspecialchars( name ),
+ getuserstatus( tid ),
+ parsetime( ctime ), ctime_str,
+ parsetime( btime ), btime_str,
+ timer[tid][TMR_MAPFIN],
+ i % 2 ? NULLSTR : " " )
+ written_len += strlen( line )
+ //if( limit && written_len > ( 1263 - strlen( cust_msg ) ) ) break
+ if( written_len > 1263 ) break
+ fprintf( fh, line )
+ }
+ //1530-150-117=1263
+ new cust_msg[33]
+ get_pcvar_string( p_stats_msg, cust_msg, 32 )
+ if( !strlen( cust_msg ) ) formatex( cust_msg, 32, "Climb %s", VERSION )
+ fprintf( fh, " |