Raised This Month: $12 Target: $400
 3% 

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:
    12 
    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 - 10515 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!
    ferret is offline
    sumguy14
    Senior Member
    Join Date: Apr 2006
    Old 07-09-2007 , 00:34   Re: HP Regeneration
    Reply With Quote #3

    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
    pRED*
    Join Date: Dec 2006
    Old 07-09-2007 , 06:16   Re: HP Regeneration
    Reply With Quote #4

    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
    mateo10
    Veteran Member
    Join Date: Jan 2006
    Old 07-08-2007 , 15:20   Re: HP Regeneration
    Reply With Quote #5

    Nice, I didn't include sourcemod, but it's still compiles, and it is working.
    Updated the plugin.
    mateo10 is offline
    andrepires68
    Member
    Join Date: Feb 2010
    Location: Portugal
    Old 02-26-2010 , 16:09   Re: HP Regeneration
    Reply With Quote #6

    Quote:
    Originally Posted by mateo10 View Post
    Nice, I didn't include sourcemod, but it's still compiles, and it is working.
    Updated the plugin.
    thx dude i love it,
    u are great.
    andrepires68 is offline
    Shaman
    Senior Member
    Join Date: Dec 2006
    Location: Istanbul, Turkey
    Old 07-08-2007 , 16:14   Re: HP Regeneration
    Reply With Quote #7

    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 #8

    A semicolon is: ;
    mateo10 is offline
    Shaman
    Senior Member
    Join Date: Dec 2006
    Location: Istanbul, Turkey
    Old 07-09-2007 , 06:02   Re: HP Regeneration
    Reply With Quote #9

    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
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 07-09-2007 , 07:27   Re: HP Regeneration
    Reply With Quote #10

    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!
    ferret 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 04:21.


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