View Single Post
Author Message
n-o-l-o
Member
Join Date: Sep 2004
Location: Germany
Old 10-11-2006 , 21:53   /top15 and /flop15 not visible in chat
Reply With Quote #1

Hello,

maybe you are interested in how to add a /flop15 command to your statsx plugin. Well, let me tell you. Add this to your statsx.sma:

Code:
//... public SayFlop15            = 0 // displays last 15 players //... register_clcmd("say /flop15", "cmdFlop15", 0, "- display flop 15 players (MOTD)") //... register_clcmd("say_team /flop15", "cmdFlop15", 0, "- display flop 15 players (MOTD)") //... server_cmd(addStast, "Say /flop15", "SayFlop15") //... // Get and format flop 15. format_flop15(sBuffer[MAX_BUFFER_LENGTH + 1]) {     new iRanks = get_statsnum()     new iMax = iRanks     new izStats[8], izBody[8]     new iLen = 0     if (iMax > 15)         iMax = 15     new lKills[16], lDeaths[16], lHits[16], lShots[16], lEff[16], lAcc[16]         format(lKills, 15, "%L", LANG_SERVER, "KILLS")     format(lDeaths, 15, "%L", LANG_SERVER, "DEATHS")     format(lHits, 15, "%L", LANG_SERVER, "HITS")     format(lShots, 15, "%L", LANG_SERVER, "SHOTS")     format(lEff, 15, "%L", LANG_SERVER, "EFF")     format(lAcc, 15, "%L", LANG_SERVER, "ACC")         ucfirst(lEff)     ucfirst(lAcc)     iLen = format(sBuffer, MAX_BUFFER_LENGTH, "<body bgcolor=#000000><font color=#FFB000><pre>")     iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%2s %-22.22s %6s %6s %6s %6s %4s %4s %4s^n", "#", "Nick", lKills, lDeaths, lHits, lShots, "HS", lEff, lAcc)         for (new i = iRanks - 1; i >= iRanks - iMax && MAX_BUFFER_LENGTH - iLen > 0; i--)     {         get_stats(i, izStats, izBody, t_sName, MAX_NAME_LENGTH)         replace_all(t_sName, MAX_NAME_LENGTH, "<", "[")         replace_all(t_sName, MAX_NAME_LENGTH, ">", "]")         iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%2d %-22.22s %6d %6d %6d %6d %4d %3.0f%% %3.0f%%^n", iRanks - i, t_sName, izStats[STATS_KILLS],                         izStats[STATS_DEATHS], izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_HS], effec(izStats), accuracy(izStats))     } } //... // Display MOTD flop15 ranked. public cmdFlop15(id) {     if (!SayFlop15)     {         client_print(id, print_chat, "%L", id, "DISABLED_MSG")         return PLUGIN_HANDLED     }     format_flop15(g_sBuffer)     show_motd(id, g_sBuffer, "Flop 15")         return PLUGIN_HANDLED } //...

I did this because i wanted a /flop15 command and not a /flop10 command/plugin.

It works fine and when you type /top15 or /flop15 in chat you will see the motd BUT you will not see the /top15 or /flop15 command in chat. I WANT THIS BACK !

Is it a problem with the web compiler? I guess not because i reinstalled the original statsx.amxx and the /top15 command is STILL not visible in chat. Strange huh?!

Do you know how to fix this? Please help!

Last edited by n-o-l-o; 02-03-2007 at 08:09.
n-o-l-o is offline