I made this plugin for my gungame server, however I've added in a lot of features to make it useful for a lot of different game types. I originally had this plugin to log which maps kill server population, but over time have added a lot more features to it.
Description
This plugin logs player populations, connects/disconnects, player info, available spawns, wins, and total rounds for each map.
CVars
pt_a_enabled - enable or disable the whole plugin
pt_b_enablemainlog - Enable/disable the main log.
pt_c_connections - logs player connects/disconnects. The plugin counts them regardless, but this controls whether or not they are put in the logs. They are counted in order to log the maximum player count a map reaches.
pt_d_mainlogdays - Number of days until old main logs are deleted. Only deletes logs beginning with pt_ in the filepath cstrike/addons/sourcemod/logs/populationtrackerv2/
pt_e_enableids - Enables logging of steam IDs and names during population checks. (0 = Disabled, 1 = Enabled) Note: Requires pt_f_enablepop = 1.
pt_f_enablepop - Enables logging of player population throughout a map every interval set by pt_g_poptimer
pt_g_poptimer - Interval (in seconds) between each population log if pt_f_enablepop = 1. Population is taken throughout entire map regardless of if pt_f_enablepop is enabled (it is used for the "last" population variable), but this controls the frequency of the population census.
pt_h_enablespawns - Enables logging of available CT/T spawns and total spawns available and outputs an additional file logging maps with less spawns than is set by pt_i_maxtlimit or pt_j_maxctlimit.
pt_i_maxtlimit - Sets number of T spawns required. If a map has let T spawns than this value, an additional file is output, logging that the map has too few Terrorist spawn points
pt_j_maxctlimit - Sets number of CT spawns required. If a map has let CT spawns than this value, an additional file is output, logging that the map has too few Counter-Terrorist spawn points
pt_k_spawntimer - This timer begins on map start, and executes after the number of seconds set by this cvar. The timer was added to allow other plugins that edit spawn points to load, before creating a log (else it would log default spawns available, and not any custom ones added).
pt_l_enablestartlastpop - Enables output of extra log containing map populations at the start/end of the map. The start population is recorded after the interval set by pt_m_startpoptimer, and the end is recorded as the last population recorded with the repeating timer, having the interval set by pt_g_poptimer.
pt_m_startpoptimer - Amount of time after map start until map start population is taken (be sure to allow time for players to connect, else this will output zero)
pt_n_sumlogdays - Number of days until old summary logs are deleted. Only deletes logs beginning with mappopsummary_ in the filepath cstrike/addons/sourcemod/logs/populationtrackerv2/
pt_o_enablerounds - Enables logging of total rounds played each map, and CT/T wins
pt_p_debugmode - Enables debug mode, outputting a debug file logging if functions trigger or not
Sample Logs:
Spoiler
mappopsummary.log - Logs Start, End, Max Players, and Change in players for a map
Code:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-02-19 01:21 Map: gg_crash_b1, Start Population: 11, Last Player Count: 14, Max Players Connected: 17, Change in players from start to finish: 3
-------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-02-19 01:28 Map: gg_upper_hand, Start Population: 15, Last Player Count: 17, Max Players Connected: 17, Change in players from start to finish: 2
-------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-02-19 01:35 Map: gg_yard_duties, Start Population: 14, Last Player Count: 21, Max Players Connected: 24, Change in players from start to finish: 7
-------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-02-19 01:39 Map: gg_scoutzknivez_hc, Start Population: 19, Last Player Count: 24, Max Players Connected: 26, Change in players from start to finish: 5
-------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-02-19 01:44 Map: gg_japan, Start Population: 24, Last Player Count: 28, Max Players Connected: 29, Change in players from start to finish: 4
-------------------------------------------------------------------------------------------------------------------------------------------------------------
2014-02-19 01:52 Map: gg_lego_arena_x, Start Population: 26, Last Player Count: 20, Max Players Connected: 27, Change in players from start to finish: -6
mapspawns.log -logs maps that have too few spawns, as set by cvars, alerts if player count exceeds spawns available
Code:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Map has too few spawn points! Map: gg_redglock_s
Set to log if T/CT spawns are less than: 18/18, T/CT spawns available: 16/16, Total available spawns: 32
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Map has too few spawn points! Map: gg_crash_b1
Set to log if T/CT spawns are less than: 18/18, T/CT spawns available: 16/16, Total available spawns: 32
AVAILABLE SPAWNS EXCEEDED! Max players connected: 34
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Map has too few spawn points! Map: gg_yard_duties
Set to log if T/CT spawns are less than: 18/18, T/CT spawns available: 12/12, Total available spawns: 24
Main Log - Connections, IDs, Mid Round Population, and Rounds logs disabled (the settings I use)
Code:
L 02/17/2014 - 17:18:24: ===============================================================================
L 02/17/2014 - 17:18:24: >>>>>>>> Map Start >>>>>>>>: Map: gg_lego_arena_x, Previous: gg_japan
L 02/17/2014 - 17:18:24: ===============================================================================
L 02/17/2014 - 17:18:24:
L 02/17/2014 - 17:18:40:
L 02/17/2014 - 17:18:40: ------- Map Spawns ------- Map: gg_lego_arena_x, T/CT spawns available: 20/20, Total available spawns: 40
L 02/17/2014 - 17:18:40:
L 02/17/2014 - 17:18:55: Map start population set as 26 players.
L 02/17/2014 - 17:23:29:
L 02/17/2014 - 17:23:29: ___________________________________________________________________________________________________________________________________
L 02/17/2014 - 17:23:29: <<<<<<<<< Map End <<<<<<<< Map: gg_lego_arena_x, Max players connected: 27, Last player count: 20
L 02/17/2014 - 17:23:29: ___________________________________________________________________________________________________________________________________
L 02/17/2014 - 17:23:29: ===============================================================================
L 02/17/2014 - 17:23:29: >>>>>>>> Map Start >>>>>>>>: Map: gg_bad_day, Previous: gg_lego_arena_x
L 02/17/2014 - 17:23:29: ===============================================================================
L 02/17/2014 - 17:23:29:
L 02/17/2014 - 17:23:44:
L 02/17/2014 - 17:23:44: ------- Map Spawns ------- Map: gg_bad_day, T/CT spawns available: 20/20, Total available spawns: 40
L 02/17/2014 - 17:23:44:
L 02/17/2014 - 17:23:59: Map start population set as 16 players.
L 02/17/2014 - 17:29:05:
L 02/17/2014 - 17:29:05: ___________________________________________________________________________________________________________________________________
L 02/17/2014 - 17:29:05: <<<<<<<<< Map End <<<<<<<< Map: gg_bad_day, Max players connected: 21, Last player count: 16
L 02/17/2014 - 17:29:05: ___________________________________________________________________________________________________________________________________
L 02/17/2014 - 17:29:05: ===============================================================================
L 02/17/2014 - 17:29:05: >>>>>>>> Map Start >>>>>>>>: Map: gg_russia, Previous: gg_bad_day
L 02/17/2014 - 17:29:05: ===============================================================================
L 02/17/2014 - 17:29:05:
L 02/17/2014 - 17:29:20:
L 02/17/2014 - 17:29:20: ------- Map Spawns ------- Map: gg_russia, T/CT spawns available: 18/18, Total available spawns: 36
Main Log - Everything enabled (not recommended - can be messy) Note: Steam IDs changed to x's in this example for privacy, and total rounds = 0 because gungame is one round that doesnt end
Code:
L 02/17/2014 - 17:47:52: ===============================================================================
L 02/17/2014 - 17:47:52: >>>>>>>> Map Start >>>>>>>>: Map: gg_chilled, Previous: gg_aim_jungle_brick
L 02/17/2014 - 17:47:52: ===============================================================================
L 02/17/2014 - 17:47:52:
L 02/17/2014 - 17:53:33: Player Connected - Steam: STEAM_0:1:, Name: [LDS] tHeLiViNgDeAd
L 02/17/2014 - 17:53:33:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: Bagbom
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:0:, Name: ScOoBiE
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:0:, Name: RedBuLL=D
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: ImUnderUrBed
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: ntrlprd
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:0:, Name: Protect Ya Neck
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: Reganomics Lamborghini
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: xhisors
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: StaggeR`
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: Maver!ck
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: awesomeflames3
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:0:, Name: chappo
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:1:, Name: LiimitedEdition
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:0:, Name: That One Homeless Guy
L 02/17/2014 - 17:48:01:
L 02/17/2014 - 17:48:01: Player Connected - Steam: STEAM_0:0:, Name: bulletdodger
L 02/17/2014 - 17:48:07:
L 02/17/2014 - 17:48:07:
L 02/17/2014 - 17:48:07: ------- Map Spawns ------- Map: gg_chilled, T/CT spawns available: 20/20, Total available spawns: 40
L 02/17/2014 - 17:48:07:
L 02/17/2014 - 17:48:22: Map start population set as 16 players.
L 02/17/2014 - 17:49:52:
L 02/17/2014 - 17:50:16: Player Connected - Steam: STEAM_0:1:xxxxxxxxxxx, Name: DR.EVIL
L 02/17/2014 - 17:50:16:
L 02/17/2014 - 17:50:52:
L 02/17/2014 - 17:50:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:50:52: >>>>>>>>>>>>>>> Server Population <<<<<<<<<<<<<<<<< Map: gg_chilled
L 02/17/2014 - 17:50:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: StaggeR`
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: LiimitedEdition
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: awesomeflames3
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: chappo
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: xhisors
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: RedBuLL=D
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: That One Homeless Guy
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Bagbom
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Protect Ya Neck
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ScOoBiE
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ImUnderUrBed
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: DR.EVIL
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Maver!ck
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: bulletdodger
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ntrlprd
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: [LDS] tHeLiViNgDeAd
L 02/17/2014 - 17:50:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Reganomics Lamborghini
L 02/17/2014 - 17:50:52: Total Players: 17
L 02/17/2014 - 17:50:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:51:06: Player Connected - Steam: STEAM_0:1:xxxxxxxxxxx, Name: Gunkid9
L 02/17/2014 - 17:51:06:
L 02/17/2014 - 17:51:52:
L 02/17/2014 - 17:51:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:51:52: >>>>>>>>>>>>>>> Server Population <<<<<<<<<<<<<<<<< Map: gg_chilled
L 02/17/2014 - 17:51:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: StaggeR`
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: LiimitedEdition
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: awesomeflames3
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: chappo
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: xhisors
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: RedBuLL=D
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: That One Homeless Guy
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Bagbom
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Protect Ya Neck
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ScOoBiE
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ImUnderUrBed
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Gunkid9
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: DR.EVIL
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Maver!ck
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: bulletdodger
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ntrlprd
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: [LDS] tHeLiViNgDeAd
L 02/17/2014 - 17:51:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Reganomics Lamborghini
L 02/17/2014 - 17:51:52: Total Players: 18
L 02/17/2014 - 17:51:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:52:16: Player Connected - Steam: STEAM_0:1:xxxxxxxxxxx, Name: [PG] MonsterWhiteKid
L 02/17/2014 - 17:52:16:
L 02/17/2014 - 17:52:43: Player Disconnected - Steam: STEAM_0:1:xxxxxxxxxxx, Name: [PG] MonsterWhiteKid
L 02/17/2014 - 17:52:43:
L 02/17/2014 - 17:52:52:
L 02/17/2014 - 17:52:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:52:52: >>>>>>>>>>>>>>> Server Population <<<<<<<<<<<<<<<<< Map: gg_chilled
L 02/17/2014 - 17:52:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: StaggeR`
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: LiimitedEdition
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: awesomeflames3
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: chappo
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: xhisors
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: RedBuLL=D
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: That One Homeless Guy
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Bagbom
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Protect Ya Neck
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ScOoBiE
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ImUnderUrBed
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Gunkid9
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: DR.EVIL
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Maver!ck
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: bulletdodger
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: ntrlprd
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: [LDS] tHeLiViNgDeAd
L 02/17/2014 - 17:52:52: Steam: STEAM_0:1:xxxxxxxxxxx, Name: Reganomics Lamborghini
L 02/17/2014 - 17:52:52: Total Players: 18
L 02/17/2014 - 17:52:52: ---------------------------------------------------------------------------------------
L 02/17/2014 - 17:53:33: Player Disconnect - STEAM_0:1:xxxxxxxxxxx, Name: Gunkid9
L 02/17/2014 - 17:53:33:
L 02/17/2014 - 17:53:33: Player Disconnect - STEAM_0:1:xxxxxxxxxxx, Name: DR.EVIL
L 02/17/2014 - 17:53:33:
L 02/17/2014 - 17:53:33:
L 02/17/2014 - 17:53:33: ___________________________________________________________________________________________________________________________________
L 02/17/2014 - 17:53:33: <<<<<<<<< Map End <<<<<<<< Map: gg_chilled, CT Wins: 0, T Wins: 0, Total Rounds: 0, Max players connected: 19, Last Player Count: 18
L 02/17/2014 - 17:53:33: ___________________________________________________________________________________________________________________________________
L 02/17/2014 - 17:53:33: ===============================================================================
L 02/17/2014 - 17:53:33: >>>>>>>> Map Start >>>>>>>>: Map: gg_fx_world_source, Previous: gg_chilled
L 02/17/2014 - 17:53:33: ===============================================================================
L 02/17/2014 - 17:53:33:
L 02/17/2014 - 17:53:33: Player Connected - Steam: STEAM_0:1:, Name: [LDS] tHeLiViNgDeAd
L 02/17/2014 - 17:53:33:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: Bagbom
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:0:, Name: ScOoBiE
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:0:, Name: RedBuLL=D
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: ImUnderUrBed
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: ntrlprd
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:0:, Name: Protect Ya Neck
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: Reganomics Lamborghini
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: Gunkid9
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: xhisors
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: DR.EVIL
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: StaggeR`
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: Maver!ck
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: awesomeflames3
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:0:, Name: chappo
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:1:, Name: LiimitedEdition
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:0:, Name: That One Homeless Guy
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:34: Player Connected - Steam: STEAM_0:0:, Name: bulletdodger
L 02/17/2014 - 17:53:34:
L 02/17/2014 - 17:53:48:
L 02/17/2014 - 17:53:48: ------- Map Spawns ------- Map: gg_fx_world_source, T/CT spawns available: 20/20, Total available spawns: 40
L 02/17/2014 - 17:53:48:
L 02/17/2014 - 17:54:03: Map start population set as 17 players.
Changelog
Changelog
03/25/14 (v2.5)
Adjusted a few small code bits
Hooked cvar changes
Implemented AutoExecConfig
02/25/14 (v2.4)
Added logging of when the cleanup deletes logs (including age of file deleted)
Fixed log cleaner for mappopsummary referencing wrong cvars and file strings
Added ability to disable main log
02/19/14 (v2.3)
Changed names of output files
Fixed timestamp for popsummary file (so that it works for windows OS now)
Added function to automatically delete old popsummary logs after x days (set by cvar)
Removed all WriteFileLine paths and replaced with BuildPaths
Added debug mode
Replaces indexes with a single buildpath
Cleaned up coding and organized into modules to make more clear which feature coding belongs to
02/18/14 (v2.2)
Cleaned up cvars
Changed names of output files
Added timestamp to log for map start/end populations
Added function to automatically delete old main logs after x days (set by cvar)
02/17/14 (v2.1)
- Initial release.
Installation
Simply place the .smx in your cstrike/addons/sourcemod/plugins/ folder, and create a folder for the logs as cstrike/addons/sourcemod/logs/populationtrackerv2/.
Alternately, I have provided a simple .zip file with the appropriate files/folders to allow a simple drag/drop into your cstrike/addons/sourcemod/ folder. If you choose to edit this plugin, you will need sdktools and autoexecconfig to compile it. Autoexecconfig is provided in the .zip.
Credits
Some of the original coding came from TwistedPanda's Crash Helper, so credit to him for that. I have removed most of the features from his, and added a lot of my own, but it still retains some of the coding structure from his.
Zacade (Sgt. Zuff) for help with some of the coding (timer handles, and a couple other questions I had)
Powerlord for also answering a bit of questions about timer handles here, before I talked with zacade
Rothgar for the use of his coding to delete old logs in his AFK Manager plugin.
Thanks! Not sure what you would need mysql for though. The plugin is simply taking server data and logging it to the server. Can you be more specific on what youre talking about?