AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   show_motd help (https://forums.alliedmods.net/showthread.php?t=152625)

killergirl 03-12-2011 05:15

show_motd help
 
The code is:

PHP Code:

        {
            
iLen formatsBufferMAX_BUFFER_LENGTH"<center>TOP 15</center>^n" )
            
iLen += formatsBufferiLen ], MAX_BUFFER_LENGTH iLen"<table border='1'><tr><th>%2s</th> <th>%2s</th> <th>%2s</th> <th>%2s</th> <th>%2s</th> <th>%6s</th></tr>^n""RANK""NAME""KILLS""DEATHS""POINTS""PROCESS")
                
            for( new 
0iMax && MAX_BUFFER_LENGTH iLen 0i++ )
            {
                
get_statsiizStatsizBodyt_sNameMAX_NAME_LENGTH )
                
replace_allt_sNameMAX_NAME_LENGTH"<""[" )
                
replace_allt_sNameMAX_NAME_LENGTH">""]" )
                    
                new 
Float:result
                
new Float:rez
            
                result 
= (100.0 float(izStats[STATS_KILLS]) / float(izStats[STATS_KILLS] + izStats[STATS_DEATHS]))
                
                
rez = ( (float(izStatsSTATS_DEATHS] ) / 100 ) * ( float(izStats[STATS_KILLS] ) ) )
                    
                
                
iLen += formatsBufferiLen ], MAX_BUFFER_LENGTH iLen"<tr><td>%2d.</td> <td>%-22.22s</td> <td>%6d</td> <td>%6d</td> <td><font color='blue'>%3.0f%</font></td> <td>%3.0f%%</td></tr></table>"
                
1t_sNameizStatsSTATS_KILLS ], izStatsSTATS_DEATHS ], rezresult)
            }    
        } 

The first row is ok, but the others:
[IMG]http://img851.**************/img851/3813/2011031200001v.jpg[/IMG]

Sylwester 03-12-2011 05:33

Re: show_motd help
 
Remove </table> from the string added in for loop. You need to add it only 1 time after you add all rows.


All times are GMT -4. The time now is 14:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.