From bc31952bcd15c65ccf6834af5dedf69c31acc037 Mon Sep 17 00:00:00 2001 From: Nocky <63038995+NockyCZ@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:15:19 +0100 Subject: [PATCH] Update README.md --- README.md | 185 ++++++++---------------------------------------------- 1 file changed, 26 insertions(+), 159 deletions(-) diff --git a/README.md b/README.md index fc41b79..834e1a8 100644 --- a/README.md +++ b/README.md @@ -3,26 +3,34 @@ CS2 Deathmatch plugin for [CounterStrikeSharp](https://github.com/roflmuffin/Cou Use gamemodes like `Custom` , `Casual` or `Deathmatch` for the plugin to work properly.
Set the map duration according to `mp_timelimit`, the roundtime is also determined by this cvar. -> LAST UPDATE OF WIKI IS FOR VERSION 1.0.3 (Will be updated soon) +## [Documentation/Wiki](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch) +## [Discord Support Server](https://discord.gg/sourcefactory) ### Main features -1. [Weapon Selection](#how-weapon-selection-works) -2. [Spawns Editor](#spawns-editor) -3. [Creating Custom Modes](#creating-custom-modes) -4. [Weapons Restrict](#weapons-restrict) -5. [Deathmatch Cvars](#deathmatch-cvars) -6. [Admin](#admin-commands-permission-cssroot) & [Player](#player-commands) Commands -7. Free For All (FFA) -8. Spawn protection -9. Refill ammo or health per kill/headshot -10. VIP Support -etc... - -### To-do list -- Client preferences -- Storing players weapons for different modes in the database - -

Wiki

+- [x] [Weapon Selection](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/weapons-selection) +- [x] [Creating Custom Modes](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/creating-custom-modes) + - [x] [With Examples](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/creating-custom-modes#examples) +- [x] [Weapons Restrict](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/weapons-restrict) +- [x] [Spawns Editor](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/spawns-editor) +- [x] [Configuration](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/configuration) + - [x] [General Settings](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/configuration#general-settings-1) + - [x] [Gameplay Settings](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/configuration#gameplay-settings-1) + - [x] [Sounds Settings](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/configuration#sounds-settings-1) + - [x] [Custom Commands](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/configuration#custom-commands-1) + - [x] [Players Gameplay Settings](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/configuration#players-gameplay-settings-1) + - [x] Spawn Protection + - [x] Respawn Time + - [x] Refill Ammo + - [x] Refill Health + - [x] [Client Preferences](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/configuration#players-gameplay-settings-1) + - [x] Kill Sound + - [x] Headshot Kill Sound + - [x] Knife Kill Sound + - [x] Hit Sound + - [x] Only Headsnhot + - [x] Hud Messages +- [x] VIP Support +- [x] [Admin & Players Commands](https://docs.sourcefactory.eu/cs2-free-plugins/deathmatch/commands) ### Installation 1. Download the latest verison - https://github.com/NockyCZ/CS2-Deathmatch/releases @@ -30,144 +38,3 @@ etc... 3. Restart the server 4. Configure the config files and custom modes

- -### Configuration -```/game/csgo/addons/counterstrikesharp/configs/plugins/Deathmatch/Deathmatch.json``` -| Deathmatch Settings | What it does | -| ----------------------------------- | ----------------------------------------------------------------------------------------------- | -| `free_for_all` | If the game will be FFA or Team. - `true` or `false` | -| `custom_modes` | Allow the custom modes (multicfg)? - `true` or `false` | -| `random_selection_of_modes` | Will the modes be selected randomly? - `true` or `false` | -| `map_start_custom_mode` | Which custom mode will the map start with? - `ID of mode from custom_modes.json` | -| `new_mode_countdown` | At what second does the countdown for the new mode appear? - `seconds` | -| `check_enemies_distance` | Checking the distance from opponents to disable a specific spawn? - `true` or `false` | -| `distance_from_enemies_for_respawn` | If check_enemies_distance is true, what distance will be checked? - `number` | -| `default_weapons` | ┌ What weapons will a player get if they don't have any weapons configured? | -| | ├ `0` - None | -| | ├ `1` - The first weapon from primary/secondary weapons list in the current mode | -| | └ `2` - A Random weapon from primary/secondary weapons list in the current mode | -| `respawn_players_after_new_mode` | Respawn all players at the start of a new mode? - `true` or `false` | -| `hide_round_seconds` | Display the round timer? - `true` or `false` | -| `block_radio_messages` | Block radio messages? - `true` or `false` | -| `remove_breakable_entities` | Remove breakable entities at the round start? - `true` or `false` | -| `remove_decals_after_death` | Remove all decals upon player death? (Blood, bullets, etc.) - `true` or `false` | -| `weapons_select_shortcuts` | Create your own commands for setting weapons - `weapon_name:shortcut` example: `weapon_ak47:ak` | - - -| Players Settings | What it does | -| ------------------------------ | ---------------------------------------------------------------------------------------------- | -| `VIP_Flag` | Flag for VIP players | -| `(VIP_)respawn_time` | How long does it take to respawn a player? - `float` | -| `(VIP_)spawn_protection_time` | How long will the spawn protection be? - `float` | -| `(VIP_)reffil_ammo_kill` | Refill ammo when a player eliminates someone? - `true` or `false` | -| `(VIP_)reffil_ammo_headshot` | Refill ammo when a player eliminates someone with headshot? - `true` or `false` | -| `(VIP_)refill_health_kill` | How much health does a player regenerate when they eliminate someone? - `number` | -| `(VIP_)refill_health_headshot` | How much health does a player regenerate when they eliminate someone with headshot? - `number` | - -

- -### Player Commands: -`css_gun ` - Setup a weapon (alias /w; /weapon; /guns)
-`css_gun` - Show the list of allowed weapons for the current mode (alias /w; /weapon; /guns)
-And if you have created custom command shortcuts, all players will be able to use them. - -### Admin Commands (permission: @css/root): -`css_dm_startmode ` - Start a custom mode
-

- -### How Weapon Selection works -1. Players can set their primary and secondary weapons using the `/gun ` command. -- The weapon name doesn't have to be complete. For example, to set the 'AK47', you only need to type 'ak'. -- To display the list of allowed weapons for the current mode, simply type /gun without specifying a weapon name. - -
- -- Additional informations about weapons: -- If a player doesn't have any weapon set for the current mode, they will get a weapon according to your configuration in the default_weapons section. -- If a player tries to set a blocked weapon, it will not be assigned to them. -- If a saved weapon is not in a allowed weapons list, a player will not get it upon spawning. -- Bots will always randomly get weapons from your primary/secondary weapons list for the current mode. -

- -### Spawns Editor -- The spawns will be correctly loaded only upon map reload. Therefore, after setting up your spawns, refresh the map. -
- -- Commands (permission: @css/root):
-`css_dm_editor` - Enable/disabled editor mode
-`css_dm_addspawn_ct` - Add a new CT spawn at your current position
-`css_dm_addspawn_t` - Add a new T spawn at your current position
-`css_dm_removespawn` - Remove a nearest spawn -

- -### Creating Custom Modes -```/game/csgo/addons/counterstrikesharp/plugins/Deathmatch/custom_modes.json``` -- The default mode is always [ID 0](https://i.imgur.com/mbmiOF6.png), so even if you have custom_modes turned off in the config, the game will follow the data set for the mode with [ID 0](https://i.imgur.com/mbmiOF6.png). -- When creating a custom mode, pay attention to the mode ID. Modes must be consecutive starting from 0, and no numbers should be skipped; otherwise, an error will occur. - -
- -- Parameters for custom modes -1. `mode_name` - What will the mode be named? -2. `mode_interval` - Duration of individual modes? seconds - If custom_modes are false, then the interval is turned off. -3. `armor` - What type of armor will players receive at spawn? 0 - None | 1 - Armor Only | 2 - Armor and Helmet -4. `only_hs` - Will this mode be only headshots? true or false -5. `allow_knife_damage` - Will knife damage be enabled? true or false -6. `random_weapons` - If you set this value to true, players won't be able to customize their weapons for this custom mode, and upon each spawn, they will receive a random weapon from primary/secondary_weapons. true or false. Also, if default_weapons is set to 0 or 1, players will still randomly get weapons -7. `allow_center_message` - Allow center message? true or false -8. `center_message_text` - What message will be displayed in the center message during the mode if allow_center_message is true? [Preview](https://i.imgur.com/rNNGcpa.png) -9. `primary_weapons` - List of available primary weapons for the custom mode -10. `secondary_weapons` - List of available secondary weapons for the custom mode - -
- -- List of weapons that must be in the same list: -1. `weapon_usp_silencer` and `weapon_hkp2000` -2. `weapon_mp5sd` and `weapon_mp7` -- If these weapons are not in the same weapons list (primary/secondary), an error may occur where players are not given any weapons. - -Some examples: [Only Pistols expect Deagle](https://github.com/NockyCZ/CS2-Deathmatch/blob/main/Custom%20Modes%20Examples/Only_pistols.md) , [Only AK47 & Headshot](https://github.com/NockyCZ/CS2-Deathmatch/blob/main/Custom%20Modes%20Examples/Only_AK47.md) , [Only AWP](https://github.com/NockyCZ/CS2-Deathmatch/blob/main/Custom%20Modes%20Examples/Only_awp.md) , [Only Rifles expect FAMAS and GALILAR](https://github.com/NockyCZ/CS2-Deathmatch/blob/main/Custom%20Modes%20Examples/Only_rifles.md) , [Only Shotguns with random weapons](https://github.com/NockyCZ/CS2-Deathmatch/blob/main/Custom%20Modes%20Examples/Only_shotguns.md) -

- -### Weapons Restrict -```/game/csgo/addons/counterstrikesharp/plugins/Deathmatch/weapons_restrict.json``` -- You can set weapons restrictions for individual modes. -- You can set values for individual teams or for all. -- Additionally, the restriction is divided into nonVIP and VIP players. -- Weapons restrict does not apply to bots! - -How to restrict certain weapon ? -- If the weapon is not in your primary/secondary weapons list for current custom mode, you don't need to add that weapon to the restrict. -- You cannot combine Team or All weapons restrict! It must always be set either to Team or All. -- If you set the value to 0, it means the weapon is not restricted. -- If `random_weapons` are true in a specific custom mode, then all weapons in that custom mode are not restricted. - -1. Weapon restrict for all players: -``` - "weapon_awp": [ - { - "MODE ID": "nonVIP,VIP", - "1": "1,2", // IN MODE WITH ID 1 - THE WEAPON IS RESTRICTED TO 1 FOR NONVIP PLAYERS | THE WEAPON IS RESTRICTED TO 2 FOR VIP PLAYERS - "2": "2,4", // IN MODE WITH ID 2 - THE WEAPON IS RESTRICTED TO 2 FOR NONVIP PLAYERS | THE WEAPON IS RESTRICTED TO 4 FOR VIP PLAYERS - // For example, in the mode with ID 3, this weapon is not in the primary/secondary weapons list, so we don't need to write it! - "4": "5,0" // IN MODE WITH ID 4 - THE WEAPON IS RESTRICTED TO 5 FOR NONVIP PLAYERS | THE WEAPON IS NOT RESTRICTED FOR VIP PLAYERS - } - ] -``` -2. Weapon restrict for teams: -``` - "weapon_awp": [ - { - "MODE ID": "ct:nonVIP,VIP|t:nonVIP,VIP", - "1": "ct:1,2|t:2,3", // IN MODE WITH ID 1 - THE WEAPON IS RESTRICTED FOR CT TEAM TO 1 FOR NONVIP AND TO 2 FOR VIP | FOR T TEAM TO 2 FOR NONVIP AND TO 3 FOR VIP - "2": "ct:2,3|t:3,0", // IN MODE WITH ID 2 - THE WEAPON IS RESTRICTED FOR CT TEAM TO 2 FOR NONVIP AND TO 3 FOR VIP | FOR T TEAM TO 3 FOR NONVIP AND FOR VIP IS NOT RESTRICTED - // For example, in the mode with ID 3, this weapon is not in the primary/secondary weapons list, so we don't need to write it! - "4": "ct:2,3|t:0,0" // IN MODE WITH ID 4 - THE WEAPON IS RESTRICTED FOR CT TEAM TO 2 FOR NONVIP AND TO 3 FOR VIP | THE WEAPON IS NOT RESTRICTED FOR T TEAM - } - ] -``` -

- -### Deathmatch Cvars -```/game/csgo/addons/counterstrikesharp/plugins/Deathmatch/deathmatch_cvars.txt``` -- The plugin automatically creates a `deathmatch_cvars.txt` file with pre-configured basic cvars for the proper functioning of your DM server. You can edit and set your own cvars in this file