Raised This Month: $154 Target: $400
 38% 

HP Regeneration


Post New Thread Reply   
 
Thread Tools Display Modes
Author
mateo10
Veteran Member
Join Date: Jan 2006
Plugin ID:
71
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    21 
    Plugin Description:
    As the title says, it regenerates hp to maximum health (specified via cvars)
    Old 07-08-2007 , 13:45   HP Regeneration
    Reply With Quote #1

    HP Regeneration

    Cvars (ConVars)
    • hpregen_interval - Sets how many seconds it is between the hp adding (Default 1.0)
    • hpregen_maxhp - Max HP it will regenerate to (Default: 100)
    • hpregen_inc - Increase of hp (Default: 1)

    Credits
    Everyone in #sourcemod for their support.
    Attached Files
    File Type: sp Get Plugin or Get Source (regeneration.sp - 7738 views - 1.6 KB)

    Last edited by mateo10; 07-08-2007 at 15:20.
    mateo10 is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 07-08-2007 , 14:41   Re: HP Regeneration
    Reply With Quote #2

    SM provides a #define called MAXPLAYERS, I'd use that instead of creating your own.

    You also used semicolons (Which I like!), so you should have "#pragma semicolon 1" at the top of your plugin

    Good job
    __________________
    I'm a blast from the past!

    -< www.gamehavoc.com >-
    ferret is offline
    mateo10
    Veteran Member
    Join Date: Jan 2006
    Old 07-08-2007 , 15:20   Re: HP Regeneration
    Reply With Quote #3

    Nice, I didn't include sourcemod, but it's still compiles, and it is working.
    Updated the plugin.
    mateo10 is offline
    Shaman
    Senior Member
    Join Date: Dec 2006
    Location: Istanbul, Turkey
    Old 07-08-2007 , 16:14   Re: HP Regeneration
    Reply With Quote #4

    Nice plugin. This will help lot's of plugin developers. (Like me )
    By the way:
    What is a semicolon?
    __________________
    Shaman is offline
    Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
    mateo10
    Veteran Member
    Join Date: Jan 2006
    Old 07-08-2007 , 16:56   Re: HP Regeneration
    Reply With Quote #5

    A semicolon is: ;
    mateo10 is offline
    sumguy14
    Senior Member
    Join Date: Apr 2006
    Old 07-09-2007 , 00:34   Re: HP Regeneration
    Reply With Quote #6

    Quote:
    Originally Posted by ferret View Post
    SM provides a #define called MAXPLAYERS, I'd use that instead of creating your own.

    You also used semicolons (Which I like!), so you should have "#pragma semicolon 1" at the top of your plugin

    Good job
    *Sigh*
    Gotta go through all my plugins and use MAXPLAYERS instead of my own define ... lol
    sumguy14 is offline
    Shaman
    Senior Member
    Join Date: Dec 2006
    Location: Istanbul, Turkey
    Old 07-09-2007 , 06:02   Re: HP Regeneration
    Reply With Quote #7

    Quote:
    Originally Posted by mateo10 View Post
    A semicolon is: ;
    Oh yeah, right I use them too; but I didn't know their name It's a habit from PHP.
    __________________
    Shaman is offline
    Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
    pRED*
    Join Date: Dec 2006
    Old 07-09-2007 , 06:16   Re: HP Regeneration
    Reply With Quote #8

    Quote:
    Originally Posted by ferret View Post
    SM provides a #define called MAXPLAYERS, I'd use that instead of creating your own.

    You also used semicolons (Which I like!), so you should have "#pragma semicolon 1" at the top of your plugin

    Good job
    Man you're picky...

    #pragma semicolon 1 forces you to use semi colons so if you think you're likely to forget in places then I wouldn't recommend it. Like when I'm playing around with ferrets plugins and I gets all these stupid compile errors on perfect code. Stupid semicolons.

    And using the core defined maxplayers only helps readability..if even that. It doesn't affect the compiled plugin in any way..
    pRED* is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 07-09-2007 , 07:27   Re: HP Regeneration
    Reply With Quote #9

    If you're going to use semicolons, you should be consistant about it, so should have #pragma semicolon. Either use them or don't, don't half way it.
    __________________
    I'm a blast from the past!

    -< www.gamehavoc.com >-
    ferret is offline
    sacto
    Junior Member
    Join Date: May 2007
    Old 07-27-2007 , 17:38   Re: HP Regeneration
    Reply With Quote #10

    Thanks for the plugin!!! I've been using it on my HL2DM server and noticed that it is giving a health point after the player dies (before respawn). Also here is an excerpt from my server log--it's throwing off these errors continuously. Any ideas?

    Code:
    L 07/27/2007 - 13:45:21: [SM] Plugin encountered error 8: Not enough space on the stack
    L 07/27/2007 - 13:45:21: [SM] Debug mode is not enabled for "regeneration.smx"
    L 07/27/2007 - 13:45:21: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 14 on
    L 07/27/2007 - 13:45:21: [SM] Plugin encountered error 8: Not enough space on the stack
    L 07/27/2007 - 13:45:21: [SM] Debug mode is not enabled for "regeneration.smx"
    L 07/27/2007 - 13:45:21: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 14 on
    L 07/27/2007 - 13:45:21: [SM] Plugin encountered error 8: Not enough space on the stack
    L 07/27/2007 - 13:45:21: [SM] Debug mode is not enabled for "regeneration.smx"
    L 07/27/2007 - 13:45:21: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 14 on
    L 07/27/2007 - 13:45:22: [SM] Plugin encountered error 8: Not enough space on the stack
    L 07/27/2007 - 13:45:22: [SM] Debug mode is not enabled for "regeneration.smx"
    L 07/27/2007 - 13:45:22: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 14 on
    L 07/27/2007 - 13:45:23: [SM] Plugin encountered error 8: Not enough space on the stack
    sacto 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:48.


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