Raised This Month: $ Target: $400
 0% 

TF2 Medipacks


Post New Thread Reply   
 
Thread Tools Display Modes
Author
[NATO]Hunter
Member
Join Date: Jul 2006
Location: Germany, NRW, Oberhausen
Plugin ID:
247
Plugin Version:
1.2.4
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    6 
    Plugin Description:
    Allows medics to drop medipacks on death or with secondary Medigun fire.
    Old 01-05-2008 , 21:17   TF2 Medipacks
    Reply With Quote #1

    Description

    This plugin allows medics to drop Medipacks on death or with secondary Medigun fire before they have reached full UberCharge. You can choose between 3 modes, the first one will only make Medics drop a Medipack on death. The second mode will allow medics to use their Medigun with the alternative fire to drop Medipacks and pay for them with UberCharge. And the last mode brings the first and second mode together.

    Admins are also able to change a Medics current UberCharge amount/level and set it to a value between 0 and 100. Another cool feature is the ability to set a default UberCharge that Medics will receive on spawn.

    Thanks to [gh]ferret who helped me a lot getting this thing done. Another thanks goes to GreyScale who pointed me into the right direction about how to find the current weapon. And the last thanks goes to GODJonez for pointing me into the right directions, too. This is my first SourceMod plugin and I hope you enjoy it!

    ConVars

    sm_medipacks 3 - Enable/Disable medipacks (0 = disabled | 1 = on death | 2 = on command | 3 = on death and command)
    sm_medipacks_ubercharge 25 - Give medics a default UberCharge on spawn
    sm_medipacks_small 10 - UberCharge required for small Medipacks
    sm_medipacks_medium 25 - UberCharge required for medium Medipacks
    sm_medipacks_full 50 - UberCharge required for full Medipacks
    sm_medipacks_keep 60 - Time to keep Medipacks on map. (0 = off | >0 = seconds)
    sm_medipacks_team 3 - Team to drop Medipacks for. (0 = any team | 1 = own team | 2 = opposing team | 3 = own on command, any on death)
    sm_medipacks_limit 100 - Maximum number of extra Medipacks on map at a time. (0 = unlimited)

    Commands

    sm_medipack - Can be used by any Medic as an alternative to +attack2 (secondary fire)
    sm_ubercharge - Admin Flag: cheats (default 'n') - Usage: sm_ubercharge <name|#userid> [amount]

    Installation

    Put medipacks.smx in addons\sourcemod\plugins\
    Put medipacks.phrases.txt in addons\sourcemod\translations\

    Changelog

    Version 1.2.4 - 30.05.2009
    - Fixed: Medipacks counter not handling map/round starts and player pickups, thanks Uranium235.

    Version 1.2.3 - 29.05.2009
    - Fixed: Medipacks counter was not decreased, thanks Uranium235.

    Version 1.2.2 - 27.05.2009
    - Added: sm_medipacks_limit limits maximum number of extra Medipacks on map at a time. (0 = unlimited), thanks naris.
    - Added: sm_medipacks_team 3 to drop Medipacks for own team on command, but any team on death, thanks naris.
    - Added: Native interface to control the plugin, thanks naris.
    - Changed: Medipack creation times are now stored in a dynamic array.
    - Changed: Non-Medipack entities are not removed by the plugin anymore, thanks naris.
    - Changed: Player class is not cached anymore, allows other plugins to temporary make someone a Medic, thanks naris.

    Version 1.2.0 - 29.12.2008
    - Cleanup release.
    - The player messages are now send once, thanks Antithasys.

    Version 1.1.0 - 03.08.2008

    - Config file is now written: cfg/plugin.medipacks.cfg
    - Fixed: Errors related to GetEntityNetClass

    Version 1.0.10 - 12.06.2008
    - Fixed: Errorlog being spammed.

    Version 1.0.9 - 12.05.2008
    - Fixed: Hopefully fixed random crash errors by using new entity natives.
    - Added: sm_medipacks_team 0 - Team to drop Medipacks for. (0 = any team | 1 = own team | 2 = opposing team)

    Version 1.0.8 - 09.02.2008
    - Fixed: Native "GetPlayerWeaponSlot" reported: Client X is not in game
    - Changed: Setting the required UberCharge for a Medipack to 0 does now disable that pack.

    Version 1.0.7 - 25.01.2008
    - Fixed: Server could crash if player_death was fired after the player left the server.
    - Changed: Added a warning about the entity limit and a error message that will be written into the SourceMod logs.
    - Changed: Optimized the parameters passed around the spawn stocks.

    Version 1.0.6 - 21.01.2008
    - Changed: SetEntDataFloat and GetEntDataFloat parameter checks are now correctly made.

    Version 1.0.5 - 21.01.2008
    - Fixed: Invalid SetEntDataFloat and GetEntDataFloat parameters causing crash.

    Version 1.0.4 - 07.01.2008
    - Added: sm_medipacks_keep allows you to specify the amount of seconds a pack stays on the map. (60 = default, 0 = off)
    - Added: If a Medipack times out (see above) it will disappear with a nice sound.

    Version 1.0.3 - 07.01.2008
    - Fixed: Server crashing if Entity limit was reached. (Now there will be no new Medipacks in that case.)
    - Changed: Medipacks will now spawn in front of the Medic's feet and not under the Medic.
    - Changed: Medics can not spawn a Medipack while they are UberCharge'd.

    Version 1.0.2 - 06.01.2008
    - Fixed: sm_ubercharge argument checking allowed values higher than 100 or lower than 0.

    Version 1.0.1 - 06.01.2008
    - Fixed: GetEntData/SetEntData spam if a Medic moved to spectator.

    Version 1.0.0 - 06.01.2008
    - Initial release.

    Have Fun!
    Attached Files
    File Type: txt medipacks.phrases.txt (1.5 KB, 5244 views)
    File Type: sp Get Plugin or Get Source (medipacks.sp - 7454 views - 18.6 KB)
    __________________


    Last edited by [NATO]Hunter; 05-30-2009 at 07:22. Reason: New version 1.2.4
    [NATO]Hunter is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 01-05-2008 , 22:36   Re: TF2 Medipacks
    Reply With Quote #2

    Nice job. I see you figured out the TeamNum issue as well.
    __________________
    I'm a blast from the past!
    ferret is offline
    arakcheev
    Member
    Join Date: Mar 2007
    Old 01-06-2008 , 02:08   Re: TF2 Medipacks
    Reply With Quote #3

    Sounds awesome.

    Is there any chance you could add an option to have all classes drop medipacks on death?
    arakcheev is offline
    [NATO]Hunter
    Member
    Join Date: Jul 2006
    Location: Germany, NRW, Oberhausen
    Old 01-06-2008 , 06:33   Re: TF2 Medipacks
    Reply With Quote #4

    Quote:
    Originally Posted by ferret View Post
    Nice job. I see you figured out the TeamNum issue as well.
    Yes, now it's correctly set, but changing it to 2 (BLU) or 3 (RED), does not prevent the other team from picking them up. So, nothing to play with :/

    arakcheev, I could add an option to specify which classes are allowed to do that, but I am not sure if that wouldn't hurt gameplay to much.
    __________________

    [NATO]Hunter is offline
    [NATO]Hunter
    Member
    Join Date: Jul 2006
    Location: Germany, NRW, Oberhausen
    Old 01-06-2008 , 08:18   Re: TF2 Medipacks
    Reply With Quote #5

    And just for your information. I am currently working on the same thing for Engineers, but with Ammopacks. It's a little bit different, because the Metal amount is not stored inside a weapon. It takes some time to find the correct property.

    I personally don't like the idea to make other classes drop ammo- or medipacks. I would also have to track a lot more player positions in that case, I think that would hurt the performance and gameplay. Also there would have to be more weapon checks... hm, noo. That would hurt inside each gameframe. Sorry.
    __________________

    [NATO]Hunter is offline
    komat
    Member
    Join Date: Apr 2004
    Old 01-06-2008 , 17:38   Re: TF2 Medipacks
    Reply With Quote #6

    any chance you could maek a base plugin just for the sm_ubercharge
    komat is offline
    [NATO]Hunter
    Member
    Join Date: Jul 2006
    Location: Germany, NRW, Oberhausen
    Old 01-06-2008 , 17:50   Re: TF2 Medipacks
    Reply With Quote #7

    Yeah, I could make a plugin providing sm_ubercharge and sm_metal. But, I would probably have to give them other names in that case, to avoid conflicts.
    __________________

    [NATO]Hunter is offline
    medick
    Junior Member
    Join Date: Jan 2008
    Old 01-06-2008 , 21:21   Re: TF2 Medipacks
    Reply With Quote #8

    love the plugin. my server seems to crash when its on. ran fine for an hour with it on. removed it twice to make sure it wasnt a fluke. any ideas?
    medick is offline
    medick
    Junior Member
    Join Date: Jan 2008
    Old 01-06-2008 , 21:41   Re: TF2 Medipacks
    Reply With Quote #9

    appears the plugin doesnt play nice with knifesyphon.smx or variableff.smx. i got reports that whenever a spy knifes a medic the server goes, but i think its coecidence.... both medipack and ammopack seem to work ok now since i removed the two other plugins

    Last edited by medick; 01-06-2008 at 21:43.
    medick is offline
    medick
    Junior Member
    Join Date: Jan 2008
    Old 01-06-2008 , 22:27   Re: TF2 Medipacks
    Reply With Quote #10

    nope, take it back. still randomly crashes.
    medick 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 13:20.


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