AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   HP Regeneration (https://forums.alliedmods.net/showthread.php?t=57630)

mateo10 07-08-2007 13:45

HP Regeneration
 
2 Attachment(s)
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.

ferret 07-08-2007 14:41

Re: HP Regeneration
 
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

mateo10 07-08-2007 15:20

Re: HP Regeneration
 
Nice, I didn't include sourcemod, but it's still compiles, and it is working.
Updated the plugin.

Shaman 07-08-2007 16:14

Re: HP Regeneration
 
Nice plugin. This will help lot's of plugin developers. (Like me :) )
By the way:
What is a semicolon?

mateo10 07-08-2007 16:56

Re: HP Regeneration
 
A semicolon is: ;

sumguy14 07-09-2007 00:34

Re: HP Regeneration
 
Quote:

Originally Posted by ferret (Post 500671)
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

Shaman 07-09-2007 06:02

Re: HP Regeneration
 
Quote:

Originally Posted by mateo10 (Post 500730)
A semicolon is: ;

Oh yeah, right:oops: I use them too; but I didn't know their name :) It's a habit from PHP.

pRED* 07-09-2007 06:16

Re: HP Regeneration
 
Quote:

Originally Posted by ferret (Post 500671)
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..

ferret 07-09-2007 07:27

Re: HP Regeneration
 
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.

sacto 07-27-2007 17:38

Re: HP Regeneration
 
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



All times are GMT -4. The time now is 19:14.

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