Caution
Work in progress. DOES NOT WORK ON YOUR SERVER.
Tip
This plug-in got created prior to our CS2 Challenges plug-in and will be re-created to fullfill another purpose. Challenges are a unique way to offer your players the possibility to solve challenges in order to get something in return (e.g. giving VIP or other stuff). Check out our CS2 Challenges repository to get a good working version!
This plugin logs connecting and disconnecting players as well as showing a player his playing stats (like how many connections, playtime, etc.).
- show player connection and disconnection (with Country and City)
- show player his session (after joined the game)
- save total player connections (with cooldown to avoid reconnections within a specific time frame)
- save player overall play time
- save player overall play time per team (Spectator / T / CT)
- save player overall alive/death time
- Download and extract the latest release from the GitHub releases page.
- Move the "PlayerSessions" folder to the
/addons/counterstrikesharp/plugins/directory of your gameserver. - Restart the server.
Simply overwrite all plugin files and they will be reloaded automatically or just use the Update Manager itself for an easy automatic or manual update by using the um update PlayerSessions command.
There is currently no client-side command.
This plugin automatically creates a readable JSON configuration file. This configuration file can be found in /addons/counterstrikesharp/configs/plugins/PlayerSessions/PlayerSessions.json.
{
"enabled": true,
"debug": false,
"joinmessage_enable": true,
"partmessage_enable": true,
"welcomemessage_enable": true,
"welcomemessage_delay": 5,
"enable_city_lookup": false,
"enable_country_lookup": true,
"geolite2": "GeoLite2-City.mmdb",
"player": {
"[U:X:XXXXXXXX]": {
"username": "TEST",
"clantag": "TEST",
"city": "Example City",
"country": "Example Country",
"last_ip": "127.0.0.1",
"connection_count": 1,
"connection_last_connected": 1739982463,
"connection_last_disconnected": 1739982512,
"playtime_total": 49
}
},
"ConfigVersion": 1
}You can either disable or enable the complete PlayerSessions Plugin by simply setting the enable boolean to false or true.
Shows debug messages useful when developing for this plugin.
Whether the join message is sent to all players when someone enters your server.
Whether the part message is sent to all players when someone leaves your server.
Whether the player will get a welcome message after he joined the server.
The delay before this message gets shown.
When the geolite2 city database was added, should the city be displayed on join?
When the geolite2 city database was added, should the country be displayed on join?
The file name of the MaxMind GeoLite2 city mmdb file. Needs to be downloaded manually from the MaxMind website (free account necessary).
All data about all players. Make sure to delete or change data only when user is not on the server. Otherwise user actions will overwrite it.
Clone the project:
git clone https://github.com/Kandru/cs2-player-sessions.gitGo to the project directory
cd cs2-player-sessionsInstall dependencies
dotnet restoreBuild debug files (to use on a development game server)
dotnet buildBuild release files (to use on a production game server)
dotnet publishReleased under GPLv3 by @Kandru.
- Depends on IP2Country
