Garry's Mod

Garry's Mod

920 ratings
Regeneration Health and Armor (Server side)
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun, Scenic
File Size
Posted
Updated
12.987 KB
20 Apr, 2022 @ 11:59am
18 Aug @ 2:48am
28 Change Notes ( view )

Subscribe to download
Regeneration Health and Armor (Server side)

Description
Description
This addon is a simple regeneration of health and armor
highly configurable and easily accessible through console
well suited for servers since all code is on the server side and not as related to the player

if you want change value on client side you need add - gafregen in console
example - gafregen gaf_armor_delay 3
only superadmin can change value

Console Commands

ARMOR
  • gaf_armor_delay - Delay between getting armor back
  • gaf_armor_hurtdelay - Number of seconds the regeneration starts after being hurt
  • gaf_armor - How much armor you get back after one regeneration cycle
  • gaf_armor_playermax - Take player max armor
  • gaf_armor_enable - Enable Regeneration
  • gaf_armor_adminonly - Regeneration Admin-Only
  • gaf_armor_maxarmor - The amount of armor that should regenerate


HEALTH
  • gaf_health_delay - Delay between getting armor back
  • gaf_health_hurtdelay - Number of seconds the regeneration starts after being hurt
  • gaf_health - How much health you get back after one regeneration cycle
  • gaf_health_playermax - Take player max health
  • gaf_health_enable - Enable Regeneration
  • gaf_health_adminonly - Regeneration Admin-Only
  • gaf_health_maxhealth - The amount of health that should regenerate

OTHER
  • reset - Reset delay

Credit
by GAF

Please report any bugs in the comments
100 Comments
A_Swarm_of_Wasps 31 Jul @ 3:07pm 
you can still heal over it with medkits
linkclick  [author] 30 Jul @ 11:58am 
Updated, added a setting to spawn with the amount of health you put as max
A_Swarm_of_Wasps 29 Jul @ 7:15pm 
max health doesnt work i can still go over the limit. also can you add a setting to spawn with the amount of health you put as max?
Technical Difficulties 28 Jul @ 7:54pm 
I wonder, would it be possible to set health/armor "breakpoints"? For example, if you wanted to regen up to the nearest multiple of 25, it would regen up to 100 if you only lost 20, but if you lost 40 it would only regen back up to 75.

It's not a big deal, but would be really neat to see, as it would still provide a major reason to use other, more direct healing items/addons such as stims or medpacks. That is, assuming that it isn't too much effort on your part.
linkclick  [author] 28 Jul @ 10:15am 
Updated
gm_Redlerman16 28 Jul @ 9:42am 
found this error, fix?

[Regeneration Health and Armor (Server side)] lua/includes/extensions/net.lua:154: bad argument #1 to 'pairs' (table expected, got nil)
1. pairs - [C]:-1
2. WriteTable - lua/includes/extensions/net.lua:154
3. SendConVars - lua/g4fregen/sv_regen.lua:43
4. unknown - lua/g4fregen/sv_regen.lua:92
Eipcorion 20 Jul @ 4:21pm 
I changed my max health and it wasn't effected. I changed the regen time to zero and the shield regenerated instead. Something was definitely screwed up.
The Door to Guf #FixTF2 20 Jul @ 12:15pm 
does nothing
ג҉א҉ָ҉ן҉ 13 Jul @ 1:10pm 
small addon
caring creator
linkclick  [author] 11 Jul @ 5:03pm 
Updated, fixed File was not delivered to the client