Raised This Month: $168 Target: $400
 42% 

sm_bhop_health


Post New Thread Reply   
 
Thread Tools Display Modes
Author
mgunnett
Member
Join Date: May 2008
Location: Somewhere in null...
Plugin ID:
1309
Plugin Version:
1.3.1
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Sets a players health to X amount of health on spawn and damage.
    Old 12-03-2009 , 16:01   sm_bhop_health
    Reply With Quote #1

    Description:

    I needed a plugin for a 24/7 bhop server that I have for maps that do not prevent fall damage from occurring. I could not find a plugin that suited this purpose, so I took Bl4nk's HPRegeneration mod and heavily modified it. So all credit goes to Bl4nk. Credit goes to Antithasys for practically re-writing the plugin to correct some logic flaws and how ConVar hooking was used.

    Note: I kept the ability for bots to have their health auto set to a certain amount. I'm not sure who would need such functionality but it never hurts to have it in there.

    Current Version:

    1.3.1

    Game:

    With permission from Antithasys, I have set it to game "Any". Please report any problems that occur in other mods.

    Installation:

    Drop the plugin into your sourcemod/plugins directory and either restart the server or type sm plugins refresh in console.

    Update:

    Drop the plugin into the sourcemod/plugins directory and overwrite the previous installation. Type sm plugins unload sm_bhop_health.smx; sm plugins refresh into console or restart the server.

    Cvars:

    sm_bhop_health_version - Current version of the plugin.
    - 1.1.0
    sm_bhop_health_enable - Enables the Bhop Health plugin.
    - 0 = off
    - 1 = on (default)
    sm_bhop_health_hp - Health to set to.
    - 500 = Set health to 500 (default)
    - 1000 = Set health to 1000
    sm_bhop_health_delay - Time to delay health regening.
    - 0.0 = Instantly (default)
    - 0.5 = Half a second after being hurt
    - 10.0 = Ten seconds after being hurt
    sm_bhop_health_bots - Enables bots regenerating their life.
    - 0 = Bots do not get health boost. (default)
    - 1 = Bots do get health boost.
    sm_bhop_health_spawn_only - Disables health regening after spawn.
    - 0 = Regen works like normal. (default)
    - 1 = Health is only set at spawn, and not when the player is hurt.


    Future features:

    None.

    ChangeLog:

    09-15-2010 - 1.3.1

    ! Corrected potential bug with timers when a client disconnects.

    09-15-2010 - 1.3.0

    ! Updated comments throughout the plugin.
    + Added Cvar to delay when a user gets their health back.
    + Added Cvar to disable giving health back to the user after spawn.

    03-14-2010 - 1.1.0

    ! Updated plugin to fix logic and reduce overhead - credit to Antithasys for the changes.

    12-03-2009 - 1.0.0

    + Initial Release
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_bhop_health.sp - 1208 views - 6.0 KB)
    __________________
    [IMG]http://img209.**************/img209/2452/picture4ix9.jpg[/IMG]
    My Plugins: Bhop Health

    Last edited by mgunnett; 02-11-2011 at 04:38. Reason: Updated plugin and post.
    mgunnett is offline
    jab2000
    Junior Member
    Join Date: Jun 2009
    Old 02-20-2010 , 23:51   Re: sm_bhop_health
    Reply With Quote #2

    Thanks, will put this on my two Bhop servers
    __________________
    jab2000 is offline
    mgunnett
    Member
    Join Date: May 2008
    Location: Somewhere in null...
    Old 02-22-2010 , 03:56   Re: sm_bhop_health
    Reply With Quote #3

    No problem. Let me know if there are any problems.
    __________________
    [IMG]http://img209.**************/img209/2452/picture4ix9.jpg[/IMG]
    My Plugins: Bhop Health
    mgunnett is offline
    GrO
    Veteran Member
    Join Date: Jun 2010
    Location: Poland
    Old 09-15-2010 , 03:01   Re: sm_bhop_health
    Reply With Quote #4

    Great plugin man, thanks.

    I've removed HP Regeneration functionality, cause I'm using it to set HP amount only on some maps on my server. That's because there's no option to delay the healing action for specified amount of time, but it's not an issue, as it was meant for BHop servers.

    I'm using it for FUN server on some maps, so I needed a delay time for HP Regeneration option, but I'm using a different plugin for this.

    It would be good, if You could add the following option:

    sm_bhop_health_hp_delay - Sets the amount of time (seconds) to delay HP regeneration.
    - 0.0 = Instant (default)
    - 0.5 = Delays HP Regeneration for half second
    - 10.0 = Delays HP Regeneration for 10 seconds (MAX value)
    __________________
    GrO is offline
    mgunnett
    Member
    Join Date: May 2008
    Location: Somewhere in null...
    Old 09-15-2010 , 05:17   Re: sm_bhop_health
    Reply With Quote #5

    I'm supposing that Blank's Original plugin that this one is based off of does not suffice because it regen's in Ticks over a certain period of time up to the maximum health, instead of instantly after a certain amount of time?

    I'll see what I can do.

    EDIT:

    I've attached an edited version. I'm unsure if it actually works since I don't have time to test it. Just a note on the behavior. Currently if someone is damaged, the timer will start counting down till they are healed or die. The timer currently does not reset when the player takes damage again. So in other words, if the plugin is set to heal bob 10 seconds after he takes damage, and bob takes more damage 5 seconds after he originally took damage, the countdown does not reset.

    If you would like it to reset, I can add in a cvar for it.
    __________________
    [IMG]http://img209.**************/img209/2452/picture4ix9.jpg[/IMG]
    My Plugins: Bhop Health

    Last edited by mgunnett; 09-16-2010 at 00:01. Reason: Removed Attatchment
    mgunnett is offline
    GrO
    Veteran Member
    Join Date: Jun 2010
    Location: Poland
    Old 09-15-2010 , 08:25   Re: sm_bhop_health
    Reply With Quote #6

    Wow, what a fast response. Big thanks for Your job, I'll test it, as soon, as possible.

    BTW:
    I think there's no need to reset the timer.

    EDIT:
    I forgot about one thing. A CVar, that will disable HP regening, but will leave setting up HP amount enabled. On some maps I just don't want HP to regenerate, but I need to set HP to a specified amount.

    I know it's against Your primary idea for this plugin, but it would be good, if You'd like to do it.
    __________________

    Last edited by GrO; 09-15-2010 at 08:51.
    GrO is offline
    mgunnett
    Member
    Join Date: May 2008
    Location: Somewhere in null...
    Old 09-16-2010 , 00:11   Re: sm_bhop_health
    Reply With Quote #7

    Quote:
    Originally Posted by GrO View Post
    Wow, what a fast response. Big thanks for Your job, I'll test it, as soon, as possible.

    BTW:
    I think there's no need to reset the timer.
    Yea, I happened to catch your post right before I went to bed and decided to update it for kicks. =P

    As for the reset timer, It was one thing I figured someone might want. I'll worry about it though when someone actually needs it though. No need to put in code no one is going to use.


    Quote:
    Originally Posted by GrO View Post
    EDIT:
    I forgot about one thing. A CVar, that will disable HP regening, but will leave setting up HP amount enabled. On some maps I just don't want HP to regenerate, but I need to set HP to a specified amount.

    I know it's against Your primary idea for this plugin, but it would be good, if You'd like to do it.
    It was easy enough to add so I went ahead with it.

    So the plugin has been updated in the original topic. I haven't tested it but it should work. Let me know if there are any bugs.
    __________________
    [IMG]http://img209.**************/img209/2452/picture4ix9.jpg[/IMG]
    My Plugins: Bhop Health
    mgunnett is offline
    GrO
    Veteran Member
    Join Date: Jun 2010
    Location: Poland
    Old 09-16-2010 , 01:18   Re: sm_bhop_health
    Reply With Quote #8

    Nice job man.

    But
    Quote:
    Plugin failed to compile! Please try contacting the author.
    , any *.inc or *.sp needed to compile the plugin?

    And another thing I've forgot to make sm_bhop_health_delay more usefull is:

    sm_bhop_health_amount or something to set, how much HP will be added to a player per sm_bhop_health_delay time.

    I.E.:

    If sm_bhop_health_delay = 1.0 and sm_bhop_health_amount = 100, and if sm_bhop_health_hp = 300, then if player gets damage once from 300 HP to i.e. 12 HP, the plugin will give him 100 HP per 1 second until it reaches sm_bhop_health_hp.
    __________________
    GrO is offline
    mgunnett
    Member
    Join Date: May 2008
    Location: Somewhere in null...
    Old 09-16-2010 , 01:55   Re: sm_bhop_health
    Reply With Quote #9

    Quote:
    Originally Posted by GrO View Post
    Nice job man.

    Any *.inc or *.sp needed to compile the plugin?
    Sorry. I must have made a major change to the plugin. The required compiler for it is now SM version 1.2+ and I needed to change it from 1.0. It should compile now on the web compiler.

    Quote:
    Originally Posted by GrO View Post
    And another thing I've forgot to make sm_bhop_health_delay more usefull is:

    sm_bhop_health_amount or something to set, how much HP will be added to a player per sm_bhop_health_delay time.

    I.E.:

    If sm_bhop_health_delay = 1.0 and sm_bhop_health_amount = 100, and if sm_bhop_health_hp = 300, then if player gets damage once from 300 HP to i.e. 12 HP, the plugin will give him 100 HP per 1 second until it reaches sm_bhop_health_hp.
    Unfortunately this would replicate the functionality of Bl4nk's HP Regeneration plugin. If you want that functionality I would suggest using his plugin instead. Otherwise, I'm not sure adding that feature in would be such a great idea.

    Also, I re-uploaded the plugin with a change after perusing Bl4nk's patch notes and noticed a potential bug.
    __________________
    [IMG]http://img209.**************/img209/2452/picture4ix9.jpg[/IMG]
    My Plugins: Bhop Health
    mgunnett is offline
    GrO
    Veteran Member
    Join Date: Jun 2010
    Location: Poland
    Old 09-16-2010 , 02:12   Re: sm_bhop_health
    Reply With Quote #10

    Actually I'm using both, cause Bl4nk's HP Regeneration plugin is unable to set HP at spawn, it changes it after damage only, which not suites my needs in 100%.

    I'll try to post about it in his topic, thanks for everything ;].
    __________________
    GrO 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 21:24.


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