Raised This Month: $32 Target: $400
 8% 

Warmup


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mike Tomasello
Junior Member
Join Date: Jul 2007
Plugin ID:
104
Plugin Version:
1.4.46
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    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.
    Unapprover:
    Reason for Unapproving:
    numerous comments about not working
    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, 1394 views)
    File Type: txt warmup.phrases.txt (393 Bytes, 1401 views)
    File Type: sp Get Plugin or Get Source (warmup.sp - 3203 views - 10.4 KB)

    Last edited by Mike Tomasello; 08-13-2007 at 12:37. Reason: new version
    Mike Tomasello is offline
    ShadowMoses
    Junior Member
    Join Date: May 2007
    Location: Ventura, CA
    Old 07-27-2007 , 17:08   Re: Knife Warmup
    Reply With Quote #2

    Nice work Mike! Maybe you could add an option for nades as well when you get time.
    ShadowMoses is offline
    Mike Tomasello
    Junior Member
    Join Date: Jul 2007
    Old 07-27-2007 , 17:55   Re: Knife Warmup
    Reply With Quote #3

    Updated.

    Yeah, I was thinking about allowing which weapon was used to be customisable, but I'd been working on the thing for a while (took me ages to realise that sometimes users are referred to by an 'index' and sometimes an 'id', and that they are not the same thing, and that the SDKTools calls need the 'index' ), and I didn't want to spend more time trying to do infinite ammo for non-knife weapons

    I'll look into it later or tomorrow.

    Mike
    Mike Tomasello is offline
    Mike Tomasello
    Junior Member
    Join Date: Jul 2007
    Old 07-28-2007 , 08:40   Re: Knife Warmup
    Reply With Quote #4

    Updated - the weapon used is now customisable, but I still haven't added infinite ammo, so it's pointless setting it to things like 'hegren' (except maybe with 'knife too' mode on - one HE is better than none?).

    It also now supports translations. Somebody might want to verify my German translation because I'm a tad (a lot) rusty.

    Mike
    Mike Tomasello is offline
    Mike Tomasello
    Junior Member
    Join Date: Jul 2007
    Old 07-28-2007 , 10:55   Re: Knife Warmup
    Reply With Quote #5

    All right, I've made it so that weapons have infinite ammo, but now I'm stuck with something:

    'GiveNamedItem' SDKCalls refuse to work when the item is weapon_hegrenade (or weapon_flashbang, or anything like that). So there's no way for it to give grenades. I have no idea what about weapon_hegrenade is special that means it doesn't work whilst weapon_ak47 does. It's occured to me that maybe weapon_hegrenade is the wrong name, but it seems to work in CSS when I go 'use weapon_hegrenade'.

    Edit: Figured it out. As it turns out, weapon_hegrenade is too big to fit into String:weapon[16];, and I feel really silly!

    Mike

    Last edited by Mike Tomasello; 07-28-2007 at 11:02.
    Mike Tomasello is offline
    Mike Tomasello
    Junior Member
    Join Date: Jul 2007
    Old 07-28-2007 , 17:49   Re: Knife Warmup
    Reply With Quote #6

    I think that is probably the final update unless there are bugs that crop up. I may do the freezetime fix if I get a lightbulb idea how to (tried changing mp_freezetime, didn't seem to have any effect - maybe I was doing it wrong).

    The countdown is now displayed in a 'hint box' in a real-time. No more csay message every 10 seconds!

    I challenge any Mani - or other - version to have as many features!

    For grenade mode you would do:

    sm_knifewarmup_weapon "hegrenade"

    If you wanted the players to have knives as well you would do this afterwards:

    sm_knifewarmup_knifetoo "1"

    That's kinda fun, but more fun is:

    sm_knifewarmup_weapon "random"

    which chooses a random weapon to give everyone.

    My personal favourite is:

    sm_knifewarmup_weapon "haphazard"

    which gives each player a different random weapon every time you respawn.

    Thanks to teame06 on IRC for showing me what was wrong with the timer.


    In the few playtests I've done of this people seem to find it fun enough to make it a plugin of itself (not just a warmup thing), so I will probably make one like that - perhaps on a vote system.

    Mike
    Mike Tomasello is offline
    FroL
    Member
    Join Date: Jul 2007
    Old 07-28-2007 , 19:48   Re: Knife Warmup
    Reply With Quote #7

    I think, you can remove one word from description of your plugin now (knife) =).
    P.S. Sorry for my bad english

    Last edited by FroL; 07-28-2007 at 20:02.
    FroL is offline
    Mike Tomasello
    Junior Member
    Join Date: Jul 2007
    Old 07-28-2007 , 20:04   Re: Knife Warmup
    Reply With Quote #8

    Quote:
    Originally Posted by FroL View Post
    I think, you can remove one word from description of your plugin now (knife) =).
    P.S. Sorry for my bad english
    Yeah, I thought about that :p But that's still the core idea and functionality for the plug-in, and that's what the cvars are called. There didn't seem to be a real pressing need to rename.

    Mike
    Mike Tomasello is offline
    Lindgren
    Member
    Join Date: Jul 2007
    Location: Sweden
    Old 07-29-2007 , 09:59   Re: Knife Warmup
    Reply With Quote #9

    Would be great if you added cvars for "logaddress" and a enable/disable for hlstatsx
    So the warmup round can be un-ranked by hlstatsx.
    Ie. "logaddress_delall" when the warmup round start and "logaddress_add ip:port" when the warmup round ends.(where ip and port can be set with a cvar)
    And possibly an extra cvar for other plugins to use like the autoslay plugin so the players dont get slayed at the end of warmup. (set to 1 during the warmup round and 0 at all other times).
    Lindgren is offline
    Send a message via MSN to Lindgren
    Mike Tomasello
    Junior Member
    Join Date: Jul 2007
    Old 07-29-2007 , 10:08   Re: Knife Warmup
    Reply With Quote #10

    How about if I make it so it can execute a .cfg file at the beginning and a different .cfg file at the end?

    That would also solve the freezetime problem.

    I will add a 'status' type cvar too.

    Mike
    Mike Tomasello is offline
    Reply


    Thread Tools
    Display Modes

    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 16:33.


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