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

[TF2] Halloween Health


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
2039
Plugin Version:
1.0.0
Plugin Category:
Admin Commands
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Spawns Halloween themed health packs!
    Old 10-30-2010 , 00:19   [TF2] Halloween Health
    Reply With Quote #1

    [TF2] Halloween Health
    Version 1.1.0
    Credit to [NATO]Hunter's TF2 Medipacks for healthpack spawning code


    Description:
    Halloween Themed Version of This Plugin!
    Allows admins to spawn small, medium or full health kits in front of themselves.





    Commands:
    sm_halloweenhealth < small / medium / full >
    Cvars:
    sm_halloweenhealth_version - Plugin Version

    Install Instructions:
    1. Place HalloweenHealth.smx into your addons/sourcemod/plugins/ folder.

    Notes:
    Default admin level is BAN, you may want to override this to something higher.

    ToDo:
    • -

    Version History:
    • V1.0.0
      • Initial Release
    • V1.1.0
      • Fix for players not being able to pick up healthpacks (thanks to byteframe)
      • Minor code cleanup

    Total Downloads prior to last update: 271
    Attached Files
    File Type: sp Get Plugin or Get Source (HalloweenHealth.sp - 2129 views - 5.0 KB)
    __________________

    Last edited by DarthNinja; 02-04-2012 at 03:40.
    DarthNinja is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 10-30-2010 , 01:03   Re: [TF2] Halloween Health
    Reply With Quote #2

    Can we get a mod to replace regular HPs with these ones? So regular maps have these.
    __________________

    DontWannaName is offline
    aeroplane10
    Member
    Join Date: Jan 2011
    Location: Scotch Plains, NJ
    Old 07-21-2011 , 00:47   Re: [TF2] Halloween Health
    Reply With Quote #3

    Thanks, this is a great plugin!

    Update: I tried it and it doesn't work properly. It does spawn the health packs but they don't heal anyone and they won't disappear either.
    It would've been great if it worked!
    __________________

    Last edited by aeroplane10; 07-22-2011 at 10:36.
    aeroplane10 is offline
    byteframe
    Member
    Join Date: Jul 2011
    Location: Pitcairn Island
    Old 01-27-2012 , 15:35   Re: [TF2] Halloween Health
    Reply With Quote #4

    Changing the model of the item_healthkit_x entity does make it unable to be picked up.
    byteframe is offline
    byteframe
    Member
    Join Date: Jul 2011
    Location: Pitcairn Island
    Old 01-27-2012 , 22:29   Re: [TF2] Halloween Health
    Reply With Quote #5

    [Anecdotal jabbering]

    It seems like if you set the entity model to anything not in 'models/items/*', it will not be pickup-able. So...

    "models/props_halloween/halloween_medkit_medium.mdl"
    "models/props_halloween/halloween_medkit_small.mdl"
    "models/props_medieval/medieval_meat.mdl"

    Are no good. But...

    "models/items/medkit_small_bday.mdl"
    "models/items/medkit_medium_bday.mdl"
    "models/items/plate.mdl"
    "models/items/plate_steak.mdl"

    Seems to work just fine.

    Trying to force halloween mode with the tf_forcedholiday cvar or the tfforceholiday plugin made no difference.

    Changing the map to cp_manor did not allow me to eat the halloween candy.

    Changing the map to cp_degrootkeep garnered me no mutton meat.

    Trying an unrelated non-healthkit model "models/props_junk/watermelon01.mdl", did in fact work.

    So this be some weird tf2 bug with the item pickup entities, huh?

    Last edited by byteframe; 01-27-2012 at 22:38.
    byteframe is offline
    byteframe
    Member
    Join Date: Jul 2011
    Location: Pitcairn Island
    Old 02-01-2012 , 20:41   Re: [TF2] Halloween Health
    Reply With Quote #6

    of note: the item_healthkit entities have a keyvalue: Model (powerup_model)

    https://developer.valvesoftware.com/...healthkit_full
    byteframe is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 02-02-2012 , 21:59   Re: [TF2] Halloween Health
    Reply With Quote #7

    Yeah I have some things to try to fix this plugin, just not the time to try them. The kv is the first on my list.
    __________________
    DarthNinja is offline
    byteframe
    Member
    Join Date: Jul 2011
    Location: Pitcairn Island
    Old 02-03-2012 , 20:57   Re: [TF2] Halloween Health
    Reply With Quote #8

    I'll give it a shot.

    edit: works, diff:

    Code:
    147a148,159
    >         if (size == 3)
    >         {
    >             DispatchKeyValue(Medipack, "powerup_model", "models/props_halloween/halloween_medkit_large.mdl");
    >         }
    >         else if (size == 2)
    >         {
    >             DispatchKeyValue(Medipack, "powerup_model", "models/props_halloween/halloween_medkit_medium.mdl");
    >         }
    >         else if (size == 1)
    >         {
    >             DispatchKeyValue(Medipack, "powerup_model", "models/props_halloween/halloween_medkit_small.mdl");
    >         }
    154,165d165
    <             if (size == 3)
    <             {
    <                 SetEntityModel(Medipack, "models/props_halloween/halloween_medkit_large.mdl");
    <             }
    <             else if (size == 2)
    <             {
    <                 SetEntityModel(Medipack, "models/props_halloween/halloween_medkit_medium.mdl");
    <             }
    <             else if (size == 1)
    <             {
    <                 SetEntityModel(Medipack, "models/props_halloween/halloween_medkit_small.mdl");
    <             }

    Last edited by byteframe; 02-03-2012 at 21:29.
    byteframe is offline
    Smarmy
    Senior Member
    Join Date: Mar 2012
    Old 10-21-2012 , 14:37   Re: [TF2] Halloween Health
    Reply With Quote #9

    Can a 'replacement' mode be added to this so that it just replaces the current medikits on the map with the halloween ones?
    Smarmy is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 10-21-2012 , 14:49   Re: [TF2] Halloween Health
    Reply With Quote #10

    Yes, I'll work on that later.
    __________________
    DarthNinja 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 02:38.


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