Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NockyCZ committed Mar 16, 2024
2 parents d617e42 + 1e4fe5e commit d477bc2
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 159 deletions.
69 changes: 69 additions & 0 deletions Lang/uz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"Prefix": "{darkred}[Deathmatch]{default}",
"Knife_damage_disabled": "Ushbu rejimda pichoq bilan zararlanish oʻchirilgan!",
"New_mode": "{green}{0}{default} yangi rejim ishga tushirilmoqda!",
"PrimaryWeapon_Set": "Sizning asosiy qurolingiz {green}{0}{default} ga oʻzgartirildi",
"PrimaryWeapon_Disabled": "Sizning asosiy qurolingiz {green}{0}{default} ushbu rejimda oʻchirib qoʻyilgan! Boshqasini tanlang.",
"SecondaryWeapon_Set": "Sizning ikkinchi qurolingiz {green}{0}{default} ga oʻzgartirildi",
"SecondaryWeapon_Disabled": "Sizning ikkinchi qurolingiz {green}{0}{default} ushbu rejimda oʻchirib qoʻyilgan! Boshqasini tanlang.",
"Weapon_Disabled": "Ushbu rejimda qurol {green}{0}{default} oʻchirib qoʻyilgan!",
"Weapon_Is_Restricted": "Qurol {green}{0}{default} hozirda {darkred}{1}{default} bilan cheklangan (VIP: {darkred}{2}{default}) va uni sozlash imkonsiz.",
"Multiple_Weapon_Select": "Bu qurol nomi uchun bir nechta moslik topildi.",
"Weapon_Name_Not_Found": "'{green}{0}{default}' nomli qurol topilmadi.",
"Weapon_Select_Is_Disabled": "Ushbu rejimda siz qurollaringizni sozlay olmaysiz.",
"Weapon_Is_Already_Set": "'{green}{0}{default}' quroli allaqachon oʻrnatilgan.",
"Allowed_Primary_Weapons": "RUXSAT BERILGAN ASOSIY QUROLLAR:",
"Allowed_Secondary_Weapons": "RUXSAT BERILGAN IKKINCHI QUROLLAR:",
"Setup_Weapons_By_Command": "Siz qurollarni {green}/gun{default} buyrugʻi orqali olishingiz mumkin",
"New_Mode_Starts_In": "Yangi rejim {0} soniyadan keyin boshlanadi!",
"New_Mode_Started": "Yangi rejim boshlandi!",
"Menu.Title": "Deathmatch menyusi",
"Menu.SoundsTitle": "Deathmatch menyusi • Ovozlar",
"Menu.FunctionsTitle": "Deathmatch menyusi • Funksiyalar",
"Menu.Back": "Orqaga",
"Menu.Enabled": "yoqilgan",
"Menu.Disabled": "oʻchirilgan",
"Menu.Sounds": "Ovozlar menyusi",
"Menu.Functions": "Funksiyalar menyusi",
"Prefs.KillSound": "Oʻldirish ovozi",
"Prefs.HeadshotKillSound": "Boshga oʻldirish ovozi",
"Prefs.KnifeKillSound": "Pichoq bn oʻldirish ovozi",
"Prefs.HitSound": "Oʻq tekkizish ovozi",
"Prefs.OnlyHS": "Faqat boshga",
"Prefs.HudMessages": "Hud xabarlari",
"Prefs.ValueChanged": "{0} muvaffaqiyatli {green}{1}{default} boʻldi.",
"weapon_mag7": "MAG-7",
"weapon_nova": "Nova",
"weapon_sawedoff": "Sawed-Off",
"weapon_xm1014": "XM1014",
"weapon_m249": "M249",
"weapon_negev": "Negev",
"weapon_mac10": "MAC-10",
"weapon_mp5sd": "MP5-SD",
"weapon_mp7": "MP7",
"weapon_mp9": "MP9",
"weapon_p90": "P90",
"weapon_bizon": "PP-Bizon",
"weapon_ump45": "UMP45",
"weapon_ak47": "AK47",
"weapon_aug": "AUG",
"weapon_famas": "FAMAS",
"weapon_galilar": "Galil AR",
"weapon_m4a1_silencer": "M4A1-S",
"weapon_m4a1": "M4A4",
"weapon_sg556": "SG 553",
"weapon_awp": "AWP",
"weapon_g3sg1": "G3SG1",
"weapon_scar20": "SCAR-20",
"weapon_ssg08": "SSG-08",
"weapon_hkp2000": "P2000",
"weapon_cz75a": "CZ75-Auto",
"weapon_deagle": "Deagle",
"weapon_elite": "Dual Berretas",
"weapon_fiveseven": "Five-seveN",
"weapon_glock": "Glock",
"weapon_p250": "P250",
"weapon_revolver": "Revolver",
"weapon_tec9": "Tec-9",
"weapon_usp_silencer": "USP"
}
185 changes: 26 additions & 159 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,171 +3,38 @@ CS2 Deathmatch plugin for [CounterStrikeSharp](https://github.com/roflmuffin/Cou
Use gamemodes like `Custom` , `Casual` or `Deathmatch` for the plugin to work properly.<br>
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

<h1 align="center">Wiki</h1>
- [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
2. Unzip into your servers `csgo/addons/counterstrikesharp/plugins/` dir
3. Restart the server
4. Configure the config files and custom modes
<h1></h1>

### 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 <b>check_enemies_distance</b> 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` |

<h1></h1>

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

### Admin Commands (permission: @css/root):
`css_dm_startmode <ID>` - Start a custom mode<br>
<h1></h1>

### How Weapon Selection works
1. Players can set their primary and secondary weapons using the `/gun <WEAPON_NAME>` 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.

<br>

- <b>Additional informations about weapons:</b>
- If a player doesn't have any weapon set for the current mode, they will get a weapon according to your configuration in the <b>default_weapons</b> 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.
<h1></h1>

### Spawns Editor
- The spawns will be correctly loaded only upon map reload. Therefore, after setting up your spawns, refresh the map.
<br>

- Commands (permission: @css/root): <br>
`css_dm_editor` - Enable/disabled editor mode<br>
`css_dm_addspawn_ct` - Add a new CT spawn at your current position <br>
`css_dm_addspawn_t` - Add a new T spawn at your current position<br>
`css_dm_removespawn` - Remove a nearest spawn
<h1></h1>

### 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.

<br>

- <b>Parameters for custom modes</b>
1. `mode_name` - What will the mode be named?
2. `mode_interval` - Duration of individual modes? <b>seconds</b> - If custom_modes are false, then the interval is turned off.
3. `armor` - What type of armor will players receive at spawn? <b>0</b> - None | <b>1</b> - Armor Only | <b>2</b> - Armor and Helmet
4. `only_hs` - Will this mode be only headshots? <b>true</b> or <b>false</b>
5. `allow_knife_damage` - Will knife damage be enabled? <b>true</b> or <b>false</b>
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. <b>true</b> or <b>false</b>. Also, if default_weapons is set to 0 or 1, players will still randomly get weapons
7. `allow_center_message` - Allow center message? <b>true</b> or <b>false</b>
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

<br>

- <b>List of weapons that must be in the same list:</b>
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.

<b>Some examples:</b> [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)
<h1></h1>

### 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!

<b>How to restrict certain weapon ?</b>
- 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.

<b>1. Weapon restrict for all players:</b>
```
"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
}
]
```
<b>2. Weapon restrict for teams:</b>
```
"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
}
]
```
<h1></h1>

### 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

0 comments on commit d477bc2

Please sign in to comment.