Thread: Warmup
View Single Post
Author Message
Mike Tomasello
Junior Member
Join Date: Jul 2007
Old 07-27-2007 , 16:29   Warmup
Reply With Quote #1

13/August/07 - Update: v1.4.46, see changelog.
29/July/07 - Update: v1.4.45, see changelog.
28/July/07 - Update: v1.3.41, see changelog.
28/July/07 - Update: v1.2.29, see changelog.
28/July/07 - Update: v1.2.28, see changelog.
28/July/07 - Update: v1.1.25, see changelog.
28/July/07 - Update: v1.1.25, see changelog.
27/July/07 - Update: v1.0.21, see changelog.

Right, first attempt at a SourceMod plugin. I've only tested it on Linux, but it seems to work fine. There are a couple of warnings when compiling (tag mismatch - I have no idea what it is, and the lines it indicates seem fine), but no problems.

Warmup
When a new map loads, players will be given a specific weapon (or a random weapon) for a set number of seconds while other players finish connecting to the server, so that the game can begin proper. During this period, players will respawn instantly.


Installation
  • Place warmup.smx inside of the addons/sourcemod/plugins/ folder.
  • Place warmup.games.txt inside of the addons/sourcemod/gamedata/ folder.
  • Place warmup.phrases.txt inside of the addons/sourcemod/translations/ folder.
Cvars

sm_warmup_time
The amount of seconds that the Warmup takes before the game starts.

Default: 60
Minimum: 30

sm_warmup_weapon
The weapon granted during Warmup mode. Type 'buy' in the console in CSS while in a server to see a list of weapon names.

Default: "knife"
Setting this variable as "random" will choose a random weapon each map change.
Setting this variable as "haphazard" will give each user a random weapon each time they respawn.

sm_warmup_knifetoo
If the
sm_warmup_weapon cvar is set to anything other than knife, when this cvar is set to '1' the player will be given a knife as well. This is recommended for use with grenades and other slow firing weapons.
Default: "0"

sm_warmup_postconfig
Location of a config file to execute after the warm-up has finished. If you want different config files for different maps, use a map specific config file to change this cvar and point it at another config file.

Default: "sourcemod/afterwarmup.cfg"

Changelog
  • 1.4.46 (13 August 07)
    • Fixed bug whereby spectators would be 'spawned' and given weapons.
  • 1.4.45 (29 July 07)
    • Renamed plugin from Knife Warmup to just Warmup
    • Fixed a problem with player weapons array that could cause server crash.
    • Made countdown message more informative.
    • Added config file execution (change location via sm_warmup_postconfig - see above section).
    • Removed German translation because it was terrible. If people could write some decent translations I'll add them.
    • Added sm_warmup_status cvar for other plugin developers to find out if the game has started or if it is just in warmup.
  • 1.3.41 (28 July 07)
    • Fixed problem where a new timer would be created on each map change.
    • Moved count-down timer to hint box and made it real-time.
    • Added two knew weapon 'modes' ('random' and 'haphazard') - see cvar notes).
    • Fixed problem that could cause server to stall.
    • Removed center (csay) message.
  • 1.2.29 (28 July 07)
    • Size of weapon string doubled so that now hegrenade, smokegrenade and flashbang can be used.
    • A new grenade will now be given to a player once their last one detonates.
  • 1.2.28 (28 July 07)
    • Weapons now have infinite ammo.
  • 1.1.26 (28 July 07)
    • Fixed bug where on 'knifetoo' mode it would strip weapons infinitely.
  • 1.1.25 (28 July 07)
    • Fixed bug where in certain cases countdown timer would continue after a map change (into negative numbers).
    • Added different weapons ability.
    • Moved announcement messages to a translation/phrase file and added German translation (though I haven't studied German for a long time now so it may be completely wrong).
  • 1.0.21 (27 July 07)
    • Fixed problem where plugin would no longer work after first map change.
    • Countdown no longer starts while server is empty.
    • Removed '[KW]' branding on Center messages.
    • Countdown timer message at beginning of new rounds now displays real-time seconds remaining, rather than the total.
Attached Files
File Type: txt warmup.games.txt (407 Bytes, 1401 views)
File Type: txt warmup.phrases.txt (393 Bytes, 1406 views)
File Type: sp Get Plugin or Get Source (warmup.sp - 3215 views - 10.4 KB)

Last edited by Mike Tomasello; 08-13-2007 at 12:37. Reason: new version
Mike Tomasello is offline