Raised This Month: $32 Target: $400
 8% 

[TF2] Class Notifier


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Antithasys
Moderator
Join Date: Apr 2008
Plugin ID:
689
Plugin Version:
0.9.0
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Notifies players when a class is to high or to low
    Old 12-20-2008 , 21:20   [TF2] Class Notifier
    Reply With Quote #1

    Class Notifier

    Description

    Notifies players on the same team when a class is to high or to low.

    Features
    • Only notifies players of the appropriate class (other classes if low, target class if high)
    • Ability to change warning displays (player/team)
    • --Player mode displays message once on class change
    • --Team mode places message on timer and repeats to team until class is no longer high or low
    • Ability to change warning mode(chat/center/hint)
    • Ability to set min player threshold
    Commands
    • None
    Cvars
    • clsnote_enabled - Enable or Disable Class Notifier
    • clsnote_threshold - Player threshold to start notifications
    • clsnote_warningads - Who to send the warnings to (1 = Player | 2 = Team)
    • clsnote_warningmode - How to send the message (1 = Chat | 2 = Center | 3 = Hint)
    • clsnote_warning_repeat_time - Warning ad repeat time (60.0 = 1 min ads)
    Upper limit for class warnings
    Value is >=
    Default is 6, so when there are 6 of a class the warnings start
    • clsnote_highlimit_blu_demomen
    • clsnote_highlimit_blu_engineers
    • clsnote_highlimit_blu_heavies
    • clsnote_highlimit_blu_medics
    • clsnote_highlimit_blu_pyros
    • clsnote_highlimit_blu_scouts
    • clsnote_highlimit_blu_snipers
    • clsnote_highlimit_blu_soldiers
    • clsnote_highlimit_blu_spies
    • clsnote_highlimit_red_demomen
    • clsnote_highlimit_red_engineers
    • clsnote_highlimit_red_heavies
    • clsnote_highlimit_red_medics
    • clsnote_highlimit_red_pyros
    • clsnote_highlimit_red_scouts
    • clsnote_highlimit_red_snipers
    • clsnote_highlimit_red_soldiers
    • clsnote_highlimit_red_spies
    Lower limit for class warnings
    Value is <
    Default is 0, or disabled
    Setting to 3 means warnings will start 2 or less people on that class
    • clsnote_lowlimit_blu_demomen
    • clsnote_lowlimit_blu_engineers
    • clsnote_lowlimit_blu_heavies
    • clsnote_lowlimit_blu_medics
    • clsnote_lowlimit_blu_pyros
    • clsnote_lowlimit_blu_scouts
    • clsnote_lowlimit_blu_snipers
    • clsnote_lowlimit_blu_soldiers
    • clsnote_lowlimit_blu_spies
    • clsnote_lowlimit_red_demomen
    • clsnote_lowlimit_red_engineers
    • clsnote_lowlimit_red_heavies
    • clsnote_lowlimit_red_medics
    • clsnote_lowlimit_red_pyros
    • clsnote_lowlimit_red_scouts
    • clsnote_lowlimit_red_snipers
    • clsnote_lowlimit_red_soldiers
    • clsnote_lowlimit_red_spies
    Installation
    • Place the class_notifier.smx in the /sourcemod/plugins dir.
    • Place the plugin.classnotifier.cfg in the /cfg/sourcemod dir.
    Changelog

    Quote:
    0.9.0

    Initial Release
    Future Updates

    Add Translation Support

    Notes

    Thanks to Tsunami for some great code in the [TF2] Class Restrictions plugin.
    Attached Files
    File Type: sp Get Plugin or Get Source (class_notifier.sp - 1896 views - 17.9 KB)
    File Type: cfg plugin.classnotifier.cfg (2.2 KB, 752 views)
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?

    Last edited by Antithasys; 12-20-2008 at 21:57.
    Antithasys is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 12-20-2008 , 21:44   Re: [TF2] Class Notifier
    Reply With Quote #2

    Great idea for public servers. I think people respond more to this than being forced with class restrictions.
    __________________
    My Pluggies If you like, consider to me.
    BrutalGoerge is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 12-20-2008 , 23:06   Re: [TF2] Class Notifier
    Reply With Quote #3

    What would be great is for it to look at the max classes from tsunamis and warn players choosing that class that its full since his doesnt do that.
    __________________

    DontWannaName is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 12-20-2008 , 23:35   Re: [TF2] Class Notifier
    Reply With Quote #4

    I just set it to 1 below for the upper limit that I have set in the restrictions plugin. That way notices are sent out.

    The added bonus is that you also get to set low limits.

    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?

    Last edited by Antithasys; 12-21-2008 at 13:13.
    Antithasys is offline
    kopete
    New Member
    Join Date: Mar 2009
    Old 03-20-2009 , 23:03   Re: [TF2] Class Notifier
    Reply With Quote #5

    Which value of the Lower limit class warnings are the right one, the < from u forum post above or the <= value out of the attached plugin.classnotifier.cfg?
    (sorry cant´realy understand the source so i need to ask u)

    Code:
    Lower limit for class warnings
    Value is <
    Default is 0, or disabled
    Setting to 3 means warnings will start 2 or less people on that class
    Code:
    // Lower limit for class warnings
    // Value is <=
    // Default is 0, or disabled
    // Setting to 2 means warnings will start 2 or less people on that class
    I want to set clsnote_lowlimit_blu_medics to 1 for the reason the players only receive a warning if no one plays the medic. This should only work whit the <, thats why im ask.
    kopete is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 03-20-2009 , 23:26   Re: [TF2] Class Notifier
    Reply With Quote #6

    PHP Code:
    stock bool:IsLow(iTeamiClass
    {
        if (
    iTeam && iClass 0) {
            new 
    iClassCount GetClassCount(iClassiTeam);
            new 
    iLimit GetConVarInt(g_hLowLimits[iTeam][iClass]);
            if (
    iLimit && iClassCount iLimit) {
                return 
    true;
            }
        }
        return 
    false;
    }

    stock bool:IsHigh(iTeamiClass
    {
        if (
    iTeam && iClass 0) {
            new 
    iClassCount GetClassCount(iClassiTeam);
            new 
    iLimit GetConVarInt(g_hHighLimits[iTeam][iClass]);
            if (
    iLimit && iClassCount >= iLimit) {
                return 
    true;
            }
        }
        return 
    false;

    Those are the current functions, but it appears after a recent update that the current code does not functions correctly. I am not sure why, but I will be taking a look at at soon.

    You can post bugs and issues at <link removed>
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?

    Last edited by Antithasys; 08-20-2011 at 03:07. Reason: link removed
    Antithasys is offline
    kopete
    New Member
    Join Date: Mar 2009
    Old 03-21-2009 , 07:33   Re: [TF2] Class Notifier
    Reply With Quote #7

    Oh you are very fast thanks a lot
    So if see this right
    Quote:
    new iLimit = GetConVarInt(g_hLowLimits[iTeam][iClass]);
    if (
    iLimit > 0 && iClassCount < iLimit) {
    if the code is fixed for the current update it should work like i prefer!

    <link removed>
    doesn´t reachable at the moment?

    Last edited by Antithasys; 08-20-2011 at 03:08. Reason: link removed
    kopete is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 03-21-2009 , 10:01   Re: [TF2] Class Notifier
    Reply With Quote #8

    Quote:
    Originally Posted by kopete View Post
    Oh you are very fast thanks a lot
    So if see this right if the code is fixed for the current update it should work like i prefer!

    <link removed>
    doesn´t reachable at the moment?
    It is now.... stupid rails app needed to be restarted. Good to go now.
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?

    Last edited by Antithasys; 08-20-2011 at 03:08.
    Antithasys is offline
    Leontar
    Junior Member
    Join Date: Jul 2010
    Old 07-30-2011 , 02:06   Re: [TF2] Class Notifier
    Reply With Quote #9

    I am sorry to bring back an old thread but I always get the message :
    Quote:
    [class_notifier.smx] [CLSNOTE] Class notifier is loaded and disabled.
    in my logs and I never see the message. Any ideas why this happens ? Thanks.
    Leontar is offline
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 08-04-2011 , 19:12   Re: [TF2] Class Notifier
    Reply With Quote #10

    This seems to be broken.

    Anyone around to update it?
    __________________
    Extreme_One is offline
    Reply


    Thread Tools
    Display Modes

    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 00:07.


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