Simple plug-in that remembers the player's bought or picked up weapons and gives these back to the player after (re)spawn. Saves them into a config file for each player (via SteamID) and loads them when a player joins the server.
- Download and extract the latest release from the GitHub releases page.
- Move the "LoadoutKeeper" 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/LoadoutKeeper/LoadoutKeeper.json.
{
"enabled": true,
"default_setting": "ALL",
"enable_grenades": false,
"reset_buy_menu_loadout": true,
"allow_chat_command_for_primary_weapons": true,
"primary_weapons_for_chat_command": [],
"allow_chat_command_for_secondary_weapons": true,
"secondary_weapons_for_chat_command": [],
"announce_loadout_given_chat": false,
"announce_loadout_given_center": false,
"announce_loadout_given_center_alert": false,
"disabled_map_types": [
"awp_",
"aim_"
],
"ConfigVersion": 1
}Whether or not this plug-in is enabled.
The default type of weapons to save and give on respawn (every weapon_ key will be saved anyway but only the default_setting will be given to a player by default). Can be: ALL, WEAPONS, PRIMARY, SECONDARY, GRENADES OR ITEMS.
Disabled by default. If a player gets grenades on spawn he could not re-buy them in the buy menu if the maximum allowed types for a grenade have been reached... not fix known currently.
Wether or not to reset the buy menu loadout history on respawn. Defaults to true. Otherwise players can not properly change their loadout if weapons are given.
Whether or not primary weapons can be acquired via !m4 or similar at any given time if alive.
List of allowed primary weapons. Needs to be the whole weapons string e.g. "weapon_m4a1". If empty every weapon is allowed.
Whether or not secondary weapons can be acquired via !deagle or similar at any given time if alive.
List of allowed secondary weapons. Needs to be the whole weapons string e.g. "weapon_deagle". If empty every weapon is allowed.
How the player will be notified when loadout has been modified.
Map types this plug-in is disabled for. E.g. aim_ will disable all aim_* maps (looks up the beginning of the map name in lower case). Can also be a full map name where this is disabled for.
Either shows the player their current setting or allows them to change it.
Reloads the plug-in configuration.
Enables the plug-in and saves this state to the configuration.
Disables the plug-in and saves this state to the configuration.
Clone the project:
git clone https://github.com/Kandru/cs2-loadout-keeper.gitGo to the project directory
cd cs2-loadout-keeperInstall 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
