Warmup Round
Short description: This plugin will introduce a customizable warmup round in the beginning of the map.
Background: Sometimes, when a map gets changed and your computer isn't fast enough or just didn't catch stuff at the right time, you will join the game a little bit later then your opponents. You will spawn and the enemy will already be heading towards your spawn place or already camp somewhere around. This is is a disadvantage from your point of view. This plugin aims to fix it.
Detailed usage description:
Available cvars:
- warmup (1|0, default:1) - turns this plugin on, off
- warmup_time (time in seconds, default:40) - warmup time length, 0 for infinite warmup
- warmup_message (1|0, default:1) - controls message which informs players (when they spawn) when round is going to be restarted
- warmup_message_timer (1|0, default:0) - turn on/off permanent message timer (informs the player every second how much time is left)
- warmup_mode (1|0, default:0) - controls weather it is possible only to use knifes in the warmup
- warmup_respawn (1|0, default:0) - enable or disable respawn on death
- warmup_respawn_time (time, default:0.2) - set respawn time, use values >= 0.2
- warmup_armoury_invis (1|0, default:0) - hide armoury entities (useful with knife only mode)
- warmup_armoury_pick (1|0, default:1) - allows players to pickup stuff from armouries
- warmup_weapon_drop (1|0, default:1) - allows players to drop weapon
- warmup_weapon_pick (1|0, default:1) - allows players to pickup other dropped weapons
- warmup_weapons - weapons which are given the player in mode 1, further explanation down
- warmup_ammo - ammo which is given the player, further explanation down
Available commands:
- warmup_start <time> - starts the warmup <time> seconds, 0 for infinite round
- warmup_end - ends a warmup round instantly
the default warmup_ammo string is set to "000000000000000". This variable controls weather some time of ammo is infinitely available or not. 0 does nothing, while 1 says that a specific type of ammo is infinitely available. These are the ammo positiongs:
PHP Code:
0 - ammo_338mag
1 - ammo_762mm
2 - ammo_556mm_box
3 - ammo_556mm
4 - ammo_buckshot
5 - ammo_45cp
6 - ammo_57mm
7 - ammo_50e
8 - ammo_357sig
9 - ammo_9mm
10 - ammo_flashbang
11 - ammo_hegrenade
12 - ammo_smokegrenade
Example: 0010000000010 will make you have an indefinite amount of hegrenades and will make the back pack ammo amount of the machine gun indefinite (once you reload it will fill up).
the default warmup_weapons setting gives the player only a knife and looks like this: 000000000000000000000000000001000.
It has 31 digits, place nr 2 is not used, the rest can be set to give players weapons when they spawn. 0 means no weapon of this type, 1 means one instance of this weapon with full ammo, 2 an instance of this weapon with an infinite clip (no reload, just shooting all the time).
PHP Code:
0 - 1 for Kevlar, 2 for Vesthelm
1 - weapon_p228
2 - not used
3 - weapon_scout
4 - weapon_hegrenade
5 - weapon_xm1014
6 - weapon_c4
7 - weapon_mac10
8 - weapon_aug
9 - weapon_smokegrenade
10 - weapon_elite
11 - weapon_fiveseven
12 - weapon_ump45
13 - weapon_sg550
14 - weapon_galil
15 - weapon_famas
16 - weapon_usp
17 - weapon_glock18
18 - weapon_awp
19 - weapon_mp5navy
20 - weapon_m249
21 - weapon_m3
22 - weapon_m4a1
23 - weapon_tmp
24 - weapon_g3sg1
25 - weapon_flashbang
26 - weapon_deagle
27 - weapon_sg552
28 - weapon_ak47
29 - weapon_knife
30 - weapon_p90
Example: 0000000000000000000000000000210 will give all players a knife and an ak47 with an infinite clip.
New weapons configuration parser:
A new configuration mode has been added, you can now set the warmup_weapons string to "ak47? usp! knife he"
It will give the players an ak47 with endless ammo, usp with an endless clip, a knife, and a he grenade.
Use the postfixes of the weapon_* and ammo_* definitions, for example p90 for weapon_p90.
You can access some weapons through shortcuts though: he, sg, fb, ak, glock, mp5, mac.
Further examples: he! for unlimited he grenades, 556mm_box for unlimited ammo for the machine gun.
If you have some good shortcut propositions, post them in the thread.
Hud messages:
This plugin is using the standard counter strike round restart message ("The round will restart in <x> SECOND(S)"), since all clients use their own translation therefore making my work not that hard. If you really want fancy colored HUD messages, post a request.
Update log:
v0.6- Fix an out of range bug
- Add better weapon configuration parser for mode 1
v0.5- Rename cvars warmup_dm* to warmup_respawn*, warmup_knifeonly to warmup_mode
- Add permanent timer message warmup_message_timer (1|0)
- Add infinite ammo, bpammo for warmup_mode 1, controlled by warmup_weapons and warmup_ammo
- Add cvars warmup_weapon_pick, warmup_weapon_drop, warmup_armoury_pick to control fully control pick/drop ability of players during warmup.
v0.4- Enhance buy deny handling
- Add deathmatch functionality
- Add ability to hide armoury entities (weapons on the ground like fy_iceworld)
v0.3- Rename plugin from knifedm to warmup, change all prefixes to warmup
- Add cvar "warmup_knifeonly" to control weather only knifes are allowed.
- Add cvar "warmup_message" to control weather to show the "round restart" message or not.
v0.2- Add knifedm_start and knifedm_end commands.
- Add "restart round" message when spawning showing available time.
v0.1- Initial plugin, strips weapons and money on round start.
- Add cvar knifedm to control plugin
- Add cvar knifedm_delay to control round length
TODO:- Make warmup_start more customizable (select if knifeonly, messages to show)
- Support all Ultimate Warmup functionality
- Support all Warmup Pro functionality
- Support all Warmup Mod functionality
Participation:
Everyone can participate in development of this plugin, testing, suggestions are openly welcomed. If there is any kind of interest in participating in the development process itself (I'm talking about coding), notice that this plugin has high coding quality standards: code must be clean and simple. Fixes will be accept in text format, while active participation require git usage.
Code: The source code, older version and bleeding edge updates are available at
github
The latest version is attached beneath.