AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Class Notifier (https://forums.alliedmods.net/showthread.php?t=82305)

Antithasys 12-20-2008 21:20

[TF2] Class Notifier
 
2 Attachment(s)
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.

BrutalGoerge 12-20-2008 21:44

Re: [TF2] Class Notifier
 
Great idea for public servers. I think people respond more to this than being forced with class restrictions.

DontWannaName 12-20-2008 23:06

Re: [TF2] Class Notifier
 
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.

Antithasys 12-20-2008 23:35

Re: [TF2] Class Notifier
 
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.

:grrr:

kopete 03-20-2009 23:03

Re: [TF2] Class Notifier
 
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.

Antithasys 03-20-2009 23:26

Re: [TF2] Class Notifier
 
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>

kopete 03-21-2009 07:33

Re: [TF2] Class Notifier
 
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?

Antithasys 03-21-2009 10:01

Re: [TF2] Class Notifier
 
Quote:

Originally Posted by kopete (Post 785662)
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.

Leontar 07-30-2011 02:06

Re: [TF2] Class Notifier
 
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.

Extreme_One 08-04-2011 19:12

Re: [TF2] Class Notifier
 
This seems to be broken.

Anyone around to update it?


All times are GMT -4. The time now is 19:44.

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