Well, this is rank for all Half-Life-based games that share DeathMsg event.
Commands:
- say /rank - displays your current rank, rank count, kills and deaths;
- say /top15 - displays top 15 ranked players in a MOTD.
Notes:
- rank is based on "kills - deaths" calculation;
- ranks are saved in data/ranks.ini file. Line numbers mean the actual position;
- sadly MOTD fails to align kills and deaths well, sorry;
- non-Steam players are not ranked;
- team kills are not checked.
Code and Top15 MOTD optimization suggestions are welcome.
Changelog:
Quote:
3.0
-completely rewriten code;
-changed rank data storing and sorting method to Arrays;
-removed rank data size limit.
2.0
-completely rewriten code;
-changed/upgraded sorting method;
-changed the way names are stored.
1.4
-optimized sorting;
-sorting on say /rank and say /top15 changed with sorting each 15 seconds (see #define SORT_INTERVAL 15.0).
1.3
-optimized parts of the code.
1.2
-added top 15 support for games that have HTML in MOTD. Check #define TOP15 HTML; in .sma;
-optimized rank calculation variables' creation.
1.1
-fixed kill not being added when victim is not authorized.
|