This plug-in provides a simple high-ping kick mechanism for your Counter-Strike 2 game server. It simply checks the average ping of each player regularly and either kicks them or moves them to the spectator.
- Download and extract the latest release from the GitHub releases page.
- Move the "HighPingKicker" folder to the
/addons/counterstrikesharp/plugins/directory. - Restart the server.
Updating is even easier: simply overwrite all plugin files and they will be reloaded automatically. To automate updates please use our CS2 Update Manager.
This plugin automatically creates a readable JSON configuration file. This configuration file can be found in /addons/counterstrikesharp/configs/plugins/HighPingKicker/HighPingKicker.json.
{
"enabled": true,
"debug": true,
"check_interval": 2,
"ping_count": 5,
"recheck_count": 5,
"ping_threshold": 200,
"ignore_spectators": true,
"send_chat_message": true,
"send_alert_message": false,
"inform_others": true,
"action": "spectate",
"kick_reason": 39,
"whitelist": {},
"ConfigVersion": 1
}Whether or not this plug-in is enabled.
Debug mode for troubleshooting (effectively prints debug messages to the console).
How often the logic of this plug-in should run (every 2 seconds by default).
How many pings to gather before checking the average ping of a player. Keep in mind when changing the check_interval there will be a collecting phase of check_interval multiplied by ping_count first. Oldest ping will be deleted every check_interval seconds when ping_count has been reached. This can be used to slow down or speed up detection.
How often a player should be re-evaluated when the ping is above ping_threshold before a player will be kicked or moved to spectator.
Highest allowed ping of a player. Above this limit players will either be kicked or moved to spectator.
Whether or not spectators should be ignored. Make sure to use the action kick if you disable this. Otherwise the script will continuesly move the player to spectators.
Whether or not to inform players via chat message on each check if their ping is above average.
Whether or not to inform players via alert message on each check if their ping is above average. If enabled you should shorten the message via the languages available in the lang-folder.
Whether or not to inform other players via chat what happened to the high-ping player.
Action to take. Make sure it is either kick or spectate. If you miss-spell it or use some other word no action will be taken and this plug-in is useless.
The reason to kick players with. Can be one of the following list. Make sure it exists or other problems may occure: https://docs.cssharp.dev/api/CounterStrikeSharp.API.ValveConstants.Protobuf.NetworkDisconnectionReason.html
Players that will be ignored. Only the SteamID is necessary. The name is only for your reference and will not be used.
'''json { "whitelist": { "123456789": { "name": "kalle" } }, } '''
Commands admins can use inside the server console.
Reloads the config file and applies it instantly.
Clone the project:
git clone https://github.com/Kandru/cs2-high-ping-kicker.gitGo to the project directory
cd cs2-high-ping-kickerInstall dependencies
dotnet restoreBuild debug files (to use on a development game server)
dotnet buildBuild release files (to use on a production game server)
dotnet publishTODO
