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

[L4D] RageMeter


Post New Thread Reply   
 
Thread Tools Display Modes
Author
JenovaDarkness
Junior Member
Join Date: Aug 2009
Plugin ID:
1102
Plugin Version:
1.0.0j
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Simple plugin to count rage quits and kicks
    Old 08-18-2009 , 16:53   [L4D] RageMeter
    Reply With Quote #1

    L4D RageMeter
    ...formerly L4D RageCampaign

    Description
    This is a FUN and "simple" plugin which keeps track of all users that enter and leave the server during a round and campaign. It allows for people to leave and rejoin within the same round and takes account accordingly (rage quitters are considered those that don't return within the same round). It also counts sourcemod kicks and ingame vote kicks separately from quits.
    Without any CVar's configured, by default, the plugin will output to chat when players are put into the server instructing them on its use(happens when the client is placed in the server). Running counts are kept for Current Rages Per Minute(RPM), current round, last round, the best round, kicks, as well as the entire campaign. The console command sm_rage (!rage) is used to display a panel with counts when running in silent mode as well as with chat messages turned on. Sounds are turned on by default.
    This plugin properly resets the count when voting sends everyone back to the lobby or changes the campaign. It also resets at the end of the Campaign and DOES NOT count when people leave after a round has ended or before the next round has started (BY DEFAULT - but you can change this).

    Installation
    copy l4d_ragemeter.smx to addons/sourcemod/plugins/

    Commands
    sm_rage (!rage): Displays panel with rages per minute(rpm), running counts kept for each round, last round, the best round, kicks, as well as the entire campaign.

    CVAR=DefaultValue //Description
    l4d_ragemeter_debug=0 //Debug logging
    l4d_ragemeter_silent=1 //Determines whether or not to send general count notices to all players
    l4d_ragemeter_log=0 //Determines whether or not to send general count notices to SM logs
    l4d_ragemeter_kicked=1 //Determines whether or not to notify on kicked clients
    l4d_ragemeter_freshmeat=0 //Determines whether or not to notify on new clients
    l4d_ragemeter_connect_ad=1 //Determines whether or not to inform clients of plugin on putinserver event(only works when l4d_ragemeter_silent=1)
    l4d_ragemeter_rpm=1 //Determines whether or not to display rages per minute
    l4d_ragemeter_auth_type=1 //Count based on Names(0) or SteamID's(1)
    l4d_ragemeter_reset_type=0 //Reset on Round End(0) or Round Start(1)
    l4d_ragemeter_rpm_calc_time=60.0 //How often to recalculate the rpm value when no one has quit
    l4d_ragemeter_play_sounds=15 //Play notification sounds: add each together to get the combination you want: 0=Off,1=Rage,2=Kick,4=Rejoin,8=FreshMeat
    l4d_ragemeter_fresh_sound="UI/helpful_event_1.wav" //Plays to everyone when new players join
    l4d_ragemeter_rejoin_sound="UI/holdout_medal.wav" //Plays to everyone when a player rejoins
    l4d_ragemeter_rage_sound="UI/critical_event_1.wav" //Plays to everyone when players quit
    l4d_ragemeter_kick_sound="player/survivor/voice/TeenGirl/WorldAirport05NPC07.wav" //Plays to everyone when players are kicked


    Versioning
    Code:
     
    /*
    * 
    *  9/02/09
    *  v1.0.0j
    *  1. Fixed Precache check by just removing it...if you notice a problem let me know
    *  -- Fixes all sounds other than rage quit not working
    *  2. Fix CloseHandle errors due to not checking the status of the handle properly
    *  3. Changed default kick sound to Zoey's "What a dick"
    *  -- I_Am_Scum helps to test and requested it
    * 
    *  9/02/09
    *  v1.0.0i Changes
    * 1. Added sound ConVars and the ability to play sounds on new players, rejoins, kicks, and quits 
    *  2. Fixed IsClientTimingOut erroring on IsClientInGame
    *  3. Added option to count quits inbetween rounds as part of the last round(not perfect and disabled by default)
    *  4. Added rpm calculation timer - by default runs every minute
    * 
    * 8/28/09 
    *   v1.0.0h Changes:
    *  1. Protect round start and end so they can only process once
    *  2. Added IsClientTimingOut to non-quits
    *  3. Fixed Float comparison in RpmCalc
    *  4. Normalized cache value names
    *  5. Lots of debugging possible
    *  6. Resets galore for round and map functions
    *  7. Shortcircuit on campaign change vote
    * 
    *  8/25/09 
    *   v1.0.0g Changes:
    *   1. Added Rage Per Minute value (Round specific)
    *  2. Added proper shortCircuit for finale and between rounds
    *  3. Quitting after the win or loss in finale should not count
    *  4. Added and made default steamid option incase of name change reconnects to game the count(may be important later;D)
    *  5. Replaced LogAction with LogMessage
    *  6. Shortcircuit on return to lobby vote
    * 
    * 
    * 8/21/09 
    *   v1.0.0f Changes:
    *  1. Fixed native vote kicks counting against quits
    *  2. Changed from ShowActivity2 to PrintToChatAll
    *   -- complaints from text being large and ugly
    *  3. Try to fit text output on one line if possible
    *   4. Changed plugin name to RageMeter due to people wondering what RageCampaign means...lol
    *  --thanks to I_Am_Scum for the suggested name
    *  5. Added public Cvar "l4d_ragemeter_version"
    *  6. Shortened all Cvar names
    *
    * 
    *  8/20/09
    * v1.0.0e Changes:
    *  1. Added AutoExecConfig 
    *  -- thanks olj
    *  2. Hooking convar changes now 
    *  --hopefully includes values loaded by AutoExecConfig
    *  3. Added variable CVAR_FLAGS to ConVar's
    *  4. Actually updated Plugin Version this time around
    * 
    * 8/18/09 
    *  v1.0.0d Changes:
    *  1. Change name from "L4D Rage Counter" to "L4D Rage Campaign" 
    *  --Arrived late to the party and can't expect people to give up first submit first served
    * 
    *  7/6/09
    * v1.0.0c Changes: 
    *  1. Clean up constants, variable names, and added debug
    *  
    *  2/24/09
    *   v1.0.0b Changes:
    *  1. Added Rage Statistics that are kept between rounds
    *      (Last Round, Best Round, etc.)
    *  2. Added sm_rage(!rage) command to view statistics
    *  
    *  2/21/09
    *  v1.0.0a Changes:
    *   1. First Release
    * 
    */
    ToDo

    1. Store best round, best campaign, and total quit stats in sql lite or text file with reset option for admins.
    2. Implement a player level vote to forgive quitting.
    3. Implement an admin level command to forgive quitting for one user at a time.
    4. Implement admin level feature checks--make certain or all output only available to admins
    5. Separate RoundStart and RoundEnd notices into their own ConVars.
    6. Move to multi-language with phrases for all ingame notices.
    7. User display preferences with admin preferences also available

    ToDo's Completed

    1. Change plugin name to RageMeter
    2. Implement a finale check to allow people to quit after the last group of survivors are rescued and before the campaign officially ends.
    3. Check for L4D player vote kicks and add them to the kick count rather than the quit count.
    4. Switch to PrintToChat and cut down on text in output.
    5. Added sound to player connection events
    6. Added timer to rpm calculation
    7. Added option to count between rounds as part of the last round (delays lastRound/bestRound stats)
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_ragemeter.sp - 2892 views - 35.8 KB)

    Last edited by JenovaDarkness; 09-03-2009 at 23:02. Reason: Update to 1.0.0j
    JenovaDarkness is offline
    Whosat
    Senior Member
    Join Date: Nov 2007
    Location: Singapore
    Old 08-18-2009 , 18:10   Re: Darkness' [L4D] Rage Campaign
    Reply With Quote #2

    Eh the game for the plugin description, should be Left 4 Dead lol.

    Looks interesting
    __________________
    Whosat is offline
    JenovaDarkness
    Junior Member
    Join Date: Aug 2009
    Old 08-18-2009 , 19:31   Re: Darkness' [L4D] Rage Campaign
    Reply With Quote #3

    That's what I get for having to resubmit my thread...lol
    JenovaDarkness is offline
    triggerman
    Senior Member
    Join Date: Jun 2009
    Old 08-20-2009 , 04:39   Re: [L4D] Rage Campaign
    Reply With Quote #4

    works fine but it doesnt seem to create a cfg for configuration.
    triggerman is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 08-20-2009 , 04:52   Re: [L4D] Rage Campaign
    Reply With Quote #5

    Quote:
    Originally Posted by triggerman View Post
    works fine but it doesnt seem to create a cfg for configuration.
    There is no autoexec config function in OnPluginStart block.
    __________________
    olj is offline
    JenovaDarkness
    Junior Member
    Join Date: Aug 2009
    Old 08-20-2009 , 11:34   Re: [L4D] Rage Campaign
    Reply With Quote #6

    Adding AutoExecConfig, HookConVarChange, and CVAR_FLAGS.

    --Done. Going to start working on the ToDo's.

    Last edited by JenovaDarkness; 08-20-2009 at 14:17.
    JenovaDarkness is offline
    JenovaDarkness
    Junior Member
    Join Date: Aug 2009
    Old 08-21-2009 , 18:10   Re: [L4D] Rage Campaign
    Reply With Quote #7

    I only need FCVAR_NOTIFY on public cvar's right?
    JenovaDarkness is offline
    JenovaDarkness
    Junior Member
    Join Date: Aug 2009
    Old 08-29-2009 , 04:51   Re: [L4D] RageMeter
    Reply With Quote #8

    A lot of updates...please tell me what you think
    JenovaDarkness is offline
    olj
    Veteran Member
    Join Date: Jun 2009
    Old 08-29-2009 , 06:10   Re: [L4D] RageMeter
    Reply With Quote #9

    You must fill in description and version in topic header. Otherwise it cant be approved. Just a tip.
    __________________
    olj is offline
    JenovaDarkness
    Junior Member
    Join Date: Aug 2009
    Old 08-29-2009 , 08:45   Re: [L4D] RageMeter
    Reply With Quote #10

    It seems that the forum decided to reset those values as they were there when I posted originally and during subsequent updates last night...adding them again. Had a lot of trouble with service unavailable messages in the middle of updating.
    JenovaDarkness 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 22:40.


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