Simple NMRiH Stats
This is a basic point-based stats plugin for No More Room in Hell, with rank and top10 commands. Stat data is stored in a configurable database.
Default Configuration:
- Zombie kill: +1
- Headshot bonus: +1
- Death: -20
- Team kill: -20
- Extraction: +50
Configuration
The plugin uses the default local sqlite database by default. To change this, create a database configuration called
nmrihstats with your connection details.
Code:
// This file was auto-generated by SourceMod (v1.6.0-dev+4172)
// ConVars for plugin "nmrihstats.smx"
// Points to award for getting killed
// -
// Default: "-20"
sm_stats_deathpoints "-20"
// Points to award for getting extracted
// -
// Default: "50"
sm_stats_extractionpoints "50"
// Bonus points to award for headshots on top of sm_stats_killpoints
// -
// Default: "1"
sm_stats_headshot_bonus "1"
// Points to award for a zombie kill
// -
// Default: "1"
sm_stats_killpoints "1"
// New players start with the average of all player scores (0 = players start at 0)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_stats_start_at_avg "1"
// Points to award for killing a teammate
// -
// Default: "-20"
sm_stats_tkpoints "-20"
Commands
- sm_rank - Displays your current rank
- sm_top10 - Lists top 10 players
- sm_stats_setpoints <points> <#userid|name> - Set a player's stat points
- sm_stats_setpoints_id <points> <steamid> - Set a SteamID's stat points
- sm_stats_reset [code] - Reset all stats. Use once to get code, use with code to confirm.
Todo
- More customizations
- Tracking of more actions
- Translations
- Configurable point decay over time
Changelog
- 11/25/13 - v.0.1
- 11/27/13 - v.0.2
- Added sm_stats_startpoints ConVar
- Added stat notifications in players' chat area
- Fixed race condition with database connection
- Only updates names when needed
- Only allows loading on NMRiH
- 12/01/13 - v.0.3
- Added detection of fire kills
- Added headshot bonus
- Added point award for getting extracted
- Added team point award for completing an objective
- Added chat triggers for rank and top10
- 12/11/13 - v.0.4
- Added commands to set players' point values manually
- Added command to reset the stats database
- Removed sm_stats_startpoints ConVar
- New players now start at the average score of all players
- Fixed server being able to call rank and top10 commands
- Fixed plugin overriding database changes from other sources
- 12/22/13 - v.0.5
- Added sm_stats_start_at_avg ConVar to toggle players starting at the average or 0
- Players cannot start with negative points
- Fixed bug with sm_stats_setpoints targetting
- Disabled reward for objectives due to game event unreliability
- Adjusted default reward values (-20 for death, +50 for extraction)