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

Rank 3.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Statistical        Approver:   Hawk552 (427)
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-18-2010 , 09:43   Rank 3.0
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (rank.sma - 19811 views - 6.1 KB)
__________________

Last edited by hleV; 05-12-2010 at 09:16. Reason: Small fix for g_Authorized[].
hleV is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 02-18-2010 , 09:45   Re: Rank 1.0
Reply With Quote #2

Finally you made it, good job!
KadiR is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 02-18-2010 , 10:49   Re: Rank 1.0
Reply With Quote #3

Quote:
non-Steam players are not ranked.
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
papyrus_kn
Senior Member
Join Date: Feb 2009
Location: Bulgaria
Old 02-18-2010 , 11:41   Re: Rank 1.0
Reply With Quote #4

LOL!
Thank you.
__________________
papyrus_kn is offline
Send a message via Skype™ to papyrus_kn
hasta
Senior Member
Join Date: Aug 2004
Location: Ukraine, Kyiv
Old 02-18-2010 , 13:38   Re: Rank 1.1
Reply With Quote #5


bug? v1.1
hasta is offline
Send a message via ICQ to hasta
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-19-2010 , 08:29   Re: Rank 1.1
Reply With Quote #6

Quote:
Originally Posted by hasta View Post

bug? v1.1
Download 1.2 version's .sma and uncomment this:
Code:
//#define TOP15_MOTD;

Code:
#define TOP15_MOTD;
Then compile the plugin.
__________________
hleV is offline
Lesiu048
Junior Member
Join Date: Apr 2006
Location: Poland
Old 09-02-2010 , 09:15   Re: Rank 1.1
Reply With Quote #7

Quote:
Originally Posted by hasta View Post

bug? v1.1
It`s awesome plugin, but plz, can someone fix this? Its hard to read without tables or something.
Lesiu048 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-07-2010 , 06:46   Re: Rank 1.1
Reply With Quote #8

Quote:
Originally Posted by Lesiu048 View Post
It`s awesome plugin, but plz, can someone fix this? Its hard to read without tables or something.
In the code find
Code:
//#define HTML_IN_MOTD

and remove "//". Then compile the plugin.
__________________
hleV is offline
Rossonero
Senior Member
Join Date: Mar 2009
Location: Location
Old 09-13-2010 , 11:29   Re: Rank 3.0
Reply With Quote #9

well if server is using dproto, the rank will not be steam only, because there are versions of non-steam cs that generate a sort of steam id, validated by the plugin

want it steam-only for sure, add on the sma, after
replace
Code:
    if (!str_to_num(g_Data[Client][Data_SteamID][10]))
        return;
with
Code:
    if (!str_to_num(g_Data[Client][Data_SteamID][10]) || strlen(g_Data[Client][Data_SteamID]) > 18)
        return;
to check also the length of the steam id string to see if valid
as far as I can tell it only check to see if the chars after the tenth position in the string are numeral, well, that's not enough, good idea though
__________________
signature

Last edited by Rossonero; 09-13-2010 at 11:32.
Rossonero is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-18-2010 , 14:02   Re: Rank 1.1
Reply With Quote #10

Use AMXX's default rank for CS. This one is meant for games that have non-HTML MOTD.
__________________
hleV is offline
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 19:29.


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