Raised This Month: $ Target: $400
 0% 

Motd Code Help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
StepZeN
Member
Join Date: Jan 2012
Location: Sweden
Old 04-30-2012 , 08:16   Motd Code Help!
Reply With Quote #1

Hello There!

I am transcodes on a played time with top15 and i don't get the motd code to work.

this is the code i need help with:
PHP Code:
public show_top15(id)
{
       new 
icount;
    static 
sort[33][2], maxPlayers;
    
    if(!
maxPlayersmaxPlayers get_maxplayers();
    
    for(
i=1;i<=maxPlayers;i++)
    {
        
sort[count][0] = i;
        
sort[count][1] = TotalPlayedTime[i] + (get_user_time(i1) / 60);
        
count++;
    }
    
        
SortCustom2D(sort,count,"stats_custom_compare");
    
        new 
html_motd 2500 ], len
       
        len 
formatex html_motd len ], charsmax html_motd ) - len"<STYLE>body{background:#808080;color:#000000;font-family:sand-serif}table{width:100%%;font-size:16px}</STYLE><table cellpadding=2 cellspacing=0 border=0>" );
        
len += formatex html_motd len ], charsmax html_motd ) - len"<center><img src=^"http://i44.tinypic.com/w97052.png^"></center></img>");
        
len += formatex html_motd len ], charsmax html_motd ) - len"<tr align=center bgcolor=%52697B><th width=8%% align=left><font color=white> <th width=8%% align=left><font color=white>Name: <th width=8%% align=left><font color=white>Total Time:" )
       
       new 
players[32], num
    get_players
(playersnum)
    
    new 
clamp(count,0,15)
    
    new 
name[32], player
    
    
for(new 0ba++)
    {
        
player sort[a][0]
        
        
get_user_name(playername31)    
                        
len += formatex(html_motd len ], charsmax(html_motd)-len"<tr><td>%i.</td><td>%s</td><td>%i</td></tr>"a+1namesort[a][1])
                }
        }
       
        
len += formatex(html_motd len ], charsmax(html_motd)-len"</table></body></html>")
        {
        
show_motd(idhtml_motd"Played Time Top15")
      }
        return 
PLUGIN_HANDLED;

and this is the original code:

PHP Code:
public show_top15(id)
{
    new 
icount;
    static 
sort[33][2], maxPlayers;
    
    if(!
maxPlayersmaxPlayers get_maxplayers();
    
    for(
i=1;i<=maxPlayers;i++)
    {
        
sort[count][0] = i;
        
sort[count][1] = TotalPlayedTime[i] + (get_user_time(i1) / 60);
        
count++;
    }
    
    
SortCustom2D(sort,count,"stats_custom_compare");
    
    new 
motd[1024], len    
    
    len 
format(motd1023,"<body bgcolor=#000000><font color=#FFB000><pre>")
    
len += format(motd[len], 1023-len,"%s %-22.22s %3s^n""#""Name""Time")
    
    new 
players[32], num
    get_players
(playersnum)
    
    new 
clamp(count,0,15)
    
    new 
name[32], player
    
    
for(new 0ba++)
    {
        
player sort[a][0]
        
        
get_user_name(playername31)        
        
len += format(motd[len], 1023-len,"%d %-22.22s %d^n"a+1namesort[a][1])
    }
    
    
len += format(motd[len], 1023-len,"</body></font></pre>")
    
show_motd(idmotd"Played-Time Top 15")
    
    return 
PLUGIN_CONTINUE

Somebody out there to help me?,

////Sorry My Bad English////
__________________
*Plugins:*
*HNS: V.I.P Menu[70%]
*HNS: Admin Menu[30%]
*HNS: Point Mod[100%] Public: Download.
********************

StepZeN is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-30-2012 , 20:09   Re: Motd Code Help!
Reply With Quote #2

What should the .txt file be called? make sure it has the same name as in your code.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
StepZeN
Member
Join Date: Jan 2012
Location: Sweden
Old 04-30-2012 , 21:01   Re: Motd Code Help!
Reply With Quote #3

hmm,i will look tomorrow i am on my phone right now
__________________
*Plugins:*
*HNS: V.I.P Menu[70%]
*HNS: Admin Menu[30%]
*HNS: Point Mod[100%] Public: Download.
********************

StepZeN is offline
StepZeN
Member
Join Date: Jan 2012
Location: Sweden
Old 05-01-2012 , 05:47   Re: Motd Code Help!
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
What should the .txt file be called? make sure it has the same name as in your code.
hmm what "txt"?,this is not a txt motd^^
__________________
*Plugins:*
*HNS: V.I.P Menu[70%]
*HNS: Admin Menu[30%]
*HNS: Point Mod[100%] Public: Download.
********************

StepZeN is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:48.


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