Raised This Month: $51 Target: $400
 12% 

Warmup Round


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
ToXedVirus
Member
Join Date: Mar 2007
Old 09-20-2010 , 10:38   Warmup Round
Reply With Quote #1

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:
ammo_338mag
ammo_762mm
-  ammo_556mm_box
-  ammo_556mm
ammo_buckshot
ammo_45cp
ammo_57mm
ammo_50e
ammo_357sig
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:
for Kevlarfor Vesthelm
weapon_p228
not used
weapon_scout
weapon_hegrenade
weapon_xm1014
weapon_c4
weapon_mac10
weapon_aug
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.
Attached Files
File Type: sma Get Plugin or Get Source (warmup.sma - 2168 views - 17.9 KB)

Last edited by ToXedVirus; 11-26-2010 at 18:29. Reason: Better readability.
ToXedVirus is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 09-20-2010 , 12:37   Re: Knife Deathmatch Warmup
Reply With Quote #2

How to remove knife only and use the plugin without this function ?

Ps. N1ce work


.ready
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
ToXedVirus
Member
Join Date: Mar 2007
Old 09-20-2010 , 12:51   Re: Knife Deathmatch Warmup
Reply With Quote #3

There are already warmup plugins without "knife only". But I will introduce a cvar to control this behaviour. I will treat your post as a request.
ToXedVirus is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 09-20-2010 , 12:53   Re: Knife Deathmatch Warmup
Reply With Quote #4

Quote:
Originally Posted by ToXedVirus View Post
There are already warmup plugins without "knife only". But I will introduce a cvar to control this behaviour. I will treat your post as a request.

Thanks dude !


.ready
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
ToXedVirus
Member
Join Date: Mar 2007
Old 09-20-2010 , 13:29   Re: Knife Deathmatch Warmup
Reply With Quote #5

Quote:
Originally Posted by ^SmileY View Post
Thanks dude !


.ready
I added knifedm_onlyknife. And actually there is no death match functionality yet, I think I will rename this plugin into "Warmup".

the cvar knifedm_knifeonly controls weather you want knifes or not. By default its 1.
Attached Files
File Type: sma Get Plugin or Get Source (knifedm.sma - 1097 views - 3.5 KB)
ToXedVirus is offline
ToXedVirus
Member
Join Date: Mar 2007
Old 09-20-2010 , 13:49   Re: Knife Deathmatch Warmup
Reply With Quote #6

Your feature request is now in the main page integrated.
ToXedVirus is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 09-20-2010 , 16:02   Re: Knife Deathmatch Warmup
Reply With Quote #7

Quote:
Originally Posted by ToXedVirus View Post
Your feature request is now in the main page integrated.

n1ce
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-02-2010 , 06:48   Re: Warmup Round
Reply With Quote #8

How is your plugin better and worst than this one
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ToXedVirus
Member
Join Date: Mar 2007
Old 11-03-2010 , 03:38   Re: Warmup Round
Reply With Quote #9

My code is far more readable and better organized.

Furthermore, wit this plugin one is able to select the startup weapons with the warmup_weapons variable:
Quote:
warmup_weapons ak knife usp!
Where ! means that this weapon has an unlimited clip.

Believe me, I first thought of just updating Warmup Pro to fit my needs, but when I saw how bad the code actually was, I decided to create my own.
ToXedVirus is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-03-2010 , 07:12   Re: Warmup Round
Reply With Quote #10

Ok, your plugin will be considered (just open other plugin code and saw those converted natives...)

Will take time because us approver have to review 3 warmup plugins.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode