View Single Post
Author Message
crazydog
AlliedModders Donor
Join Date: Jan 2006
Old 07-31-2009 , 04:50   [L4D/L4D2] Rage Counter v2.1
Reply With Quote #1

It's recommended you delete data/maxrages.txt (or just run all the reset commands) when updating to v1.8. If you don't, sm_ragetime will produce VERY skewed results, since it will divide the time by the total # of rages, and most of those won't have had their times recorded.

Description:

First: This plugin is 100% FOR FUN! If you do not like the idea of every disconnect being called a "rage", do not use this plugin!

A "rage", in this plugin, is defined as a user disconnecting from a game by their own hand. Kicks, crashes, and timeouts are not counted as rage.

This is based on CUatTHEFINISH's idea, which he made into a plugin, then requested it to be removed (here). The basic idea for this plugin is his, but this plugin is 100% my work.

This plugin adds 1 to the number of "rages", and prints a message like this to the chat every time someone disconnects:
Quote:
[Rage Counter] There have been 4 rage quits.
It's all in fun, and is not supposed to mean anything, so don't take it too seriously.

It also contains some nifty stat tracking for (rage) quits.

Commands:
==Client Commands==
sm_rages (or say !rages, /rages) - Prints the number of rages to your chat
sm_maxrages (or say !maxrages, /maxrages) - Prints the highest number of rages in a game to your chat
sm_avgrages (or say !avgrags, /avgrages) - Prints the average number of rages per versus campaign to your chat
sm_totalrages -(or say...) - Prints the total number of rages on the server (or all forked servers).
sm_totalgames - (or say...) - Prints the total number of games played on the server (or all forked servers)
sm_ragetime - (or say...) - Prints the average connection time for people who rage quit.
==Admin Commands== (Require kick flag)
sm_rage_reset - Resets number of rages
sm_rage_resettotal - Resets total number of rages
sm_rage_resetgames - Resets total number of games
sm_rage_resetmax - Resets max rage quit count
sm_exemptrage - Exempts the next quit from being a rage
sm_rage_resettimes - Resets average rage time

Cvars:
sm_rage_version - Shows the version
sm_rage_enable - Enable (1) or disable (0) the plugin
sm_rage_versuscheck - If 1, plugin will disable itself if mp_gamemode is NOT versus, and enable itself if mp_gamemode IS versus
sm_rage_autoreset:
0 = Don't reset
1 = Use configs/ragemaps.txt
2 = Reset on maps with 01_ in their names (m1_ in l4d2)
3 = Use configs/ragemaps.txt AND maps with 01_ in their names (m1_ in l4d2)


Installation:
==Required Steps==
1) Download and place ragecounter.smx into addons/sourcemod/plugins
2) Change the map or run "sm plugins load ragecounter"
3) Edit cfg/sourcemod/plugin.rage.cfg to your needs
==Optional Steps==
3) Open addons/sourcemod/configs/ragemaps.txt (auto generated)
4) Add names of maps you want rages to reset on, one per line.
First map of each campaign is recommended

Changelog:
Code:
Left 4 Dead 2 Changelog
------------
2.1 - UNTESTED!!
 - Added support for versus/scavenge mutations (will continue to update in the future)
 - ragemaps.txt now includes passing, sacrifice, and no mercy by default
2.0
 - Changed version numbers to match between plugins
1.1
 - Added support for scavenge (teamversus/teamscavenge is implied)
 - Added sm_ragestats - prints all rage stats through one command
1.0
 - Added Left4Dead 2 Support 

Left 4 Dead Changelog
------------
2.0
 - Changed version numbers to match between plugins
1.9
 - Added sm_ragestats - prints all rage stats through one command
1.8
 - Added sm_exemptrage
 - Added "Average rage time" tracker
 - Added sm_rage_resettimes
 - Added sm_ragetime
1.7.4
 - Added FCVAR_DONTRECORD to version cvar
1.7.3
 - plugin.rage.cfg now generated in cfg/sourcemod/
 - No matter what the status of data/maxrages.txt is (not existent, missing lines, etc), it will be updated to the correct format
1.7.2
 - Fixed a bug that would cause invalid array index errors
 - Current rages are no longer reset when the plugin is reloaded
 - Fixed divide by 0 error for sm_avgrages
1.7.1
 - Added sm_rage_versuscheck. If 1, plugin will disable if mp_gamemode is NOT versus
1.7
 - Added sm_avgrages, sm_totalrages, sm_totalgames, sm_rage_resettotal, sm_rage_resetgames, sm_rage_resetmax
 - Removed sm_rage_savemax
1.6
 - Added sm_rage_enable, sm_rage_savemax, sm_maxrages
 - Now keeps track of the highest # of rages in one game
1.5
 - Fixed bug where rages would sometimes not be counted
1.4.1
 - Typo! :D
1.4 
 - sm_ragemap_autoreset updated
1.3
 - Added:
  sm_rage_autoreset
  sm_rage_reset
 - Rages will now reset on maps specified in addons/sourcemod/configs/ragemaps.txt
1.2
 - Fixed some users having double rage counts.
1.1
 - Timeouts are no longer counted
 - Kicks are no longer counted
1.0
 - Initial Release
Attached Files
File Type: sp Get Plugin or Get Source (ragecounter.sp - 2979 views - 14.7 KB)
File Type: sp Get Plugin or Get Source (l4d2_ragecounter.sp - 3095 views - 14.4 KB)

Last edited by crazydog; 12-08-2010 at 15:48.
crazydog is offline