AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need some help with the Statsx plugin (https://forums.alliedmods.net/showthread.php?t=158910)

Henoc 06-10-2011 22:47

I need some help with the Statsx plugin
 
I want to add a Knife Kill Rank to the plugin

and I dont know how D:!

I modified this
Quote:

// Get and format top 15.
format_top15(sBuffer[MAX_BUFFER_LENGTH + 1])
{
new iMax = get_statsnum()
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], lKnife[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")
format(lKnife, 15, "%L", LANG_SERVER, "SOL1") -> Knife Kill

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 %4s", "#", "Nick", lKills, lDeaths, lHits, lShots, "HS", lEff, lAcc, lKnife)

for (new i = 0; i < 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", i + 1, t_sName, izStats[STATS_KILLS],
izStats[STATS_DEATHS], izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_HS], effec(izStats), accuracy(izStats))
}
}
It can be that way? DD: can you help me?

chaotix911 06-11-2011 12:04

Re: I need some help with the Statsx plugin
 
That would take a lot of work noticing that the statsx.sma file has over 1700 lines. I think that a seperate Knife Rank plugin would be better because you wouldn't know who has the most knife kills in Top15. Try this it's much better:

http://forums.alliedmods.net/showthread.php?t=102413

the 2 versions in the thread are the same except the last version has no useless errors when compiling. if you plan on using the last version, you need to add "debug" after the plugin name in plugins.ini


All times are GMT -4. The time now is 23:24.

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