Raised This Month: $51 Target: $400
 12% 

amx_motd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
m0gely
Junior Member
Join Date: Mar 2004
Old 05-05-2004 , 14:07   amx_motd
Reply With Quote #1

I started this as a reply to post in the AMX forum, but it seams like a pretty good idea the more I think about it. It's insprired by the Psychostats Top10 in the motd feature.

Basically, you would have two files: amx_motd.amx the plugin and motd.tpl the motd template. The plugin could be made to get various info from AMX, CSstats or whatever. Then merge this info into the motd.tpl file and output to mod/motd.txt on a set interval. The motd.tpl file would the same as the motd.txt file minus the plugin data. An example motd.tpl file:
Code:
<html>
<head></head>
<body>
<h1>Top 5 players on this server:</h1>
$top_players
<h1>Admins on this server:</h1>
$admin_list
</body>
</html>
The output file (motd.txt) would be:
Code:
<html>
<head></head>
<body>
<h1>Top 5 players on this server:</h1>
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>1. player1</td>
</tr>
<tr>
<td>2. player2</td>
</tr>
<tr>
<td>3. player3</td>
</tr>
<tr>
<td>4. player4</td>
</tr>
<tr>
<td>5. player5</td>
</tr>
</table>
<h1>Admins on this server:</h1>
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>admin1</td>
</tr>
<tr>
<td>admin1</td>
</tr>
</table>
</body>
</html>
The plugin could have whatever defined in it:
  • $admin_list
    $top_players
    $map_rotation
    $ff_status
    $mm_plugin_versions
    $etc
    $etc
The person making the motd.tpl can decide what $info they want and dont want, and can still lay out the motd.txt to their preference, though the tables for the data would be somewhat set because they're generated by the plugin. But defining alot of info in there to choose from would be great. Some AMX cvars that would be helpful could be:
  • amx_motd_top "<5|10|15>" <- topX players to display
    amx_motd_bgcolor "<background table color>"
    amx_motd_fgcolor "<text color>"
    amx_motd_font "<fontname>"
    amx_motd_html "<0|1>" <- 0 = plain text, 1 = html (I think CS and DoD are only ones that support html motd)
    amx_motd_update <minutes> <- how often to update the motd.txt
    amx_motd_tablewidth <width in percentage>
The colors, fonts, and other attirbutes could easily be defined with css but not everyone knows how to do that. Those values could be left blank though so css could be used. Having the plugin do it by cvar would help less experienced admins. This is just what I have thought up in the last few minutes, so there could be alot more done with this I am sure.
__________________
-- m0gely
AMXMod guru of days long forgotten...
m0gely is offline
Old 07-20-2006, 13:56
sweat
This message has been deleted by sweat.
Reply



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 04:55.


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