Garry's Mod
Оценок: 931
Regeneration Health and Armor (Server side)
2
   
Наградить
В избранное
В избранном
Удалить
Тип Контента: Дополнение
Тип Дополнения: Инструмент
Размер файла
Добавлен
Изменён
12.987 KB
20 апр. 2022 г. в 11:59
18 авг в 2:48
Обновлений: 28 (просмотреть)

Подпишитесь, чтобы загрузить
Regeneration Health and Armor (Server side)

Описание
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
A_Swarm_of_Wasps 31 июл в 15:07 
you can still heal over it with medkits
linkclick  [создатель] 30 июл в 11:58 
Updated, added a setting to spawn with the amount of health you put as max
A_Swarm_of_Wasps 29 июл в 19:15 
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 июл в 19:54 
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  [создатель] 28 июл в 10:15 
Updated
gm_Redlerman16 28 июл в 9:42 
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 июл в 16:21 
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 июл в 12:15 
does nothing
ג҉א҉ָ҉ן҉ 13 июл в 13:10 
small addon
caring creator
linkclick  [создатель] 11 июл в 17:03 
Updated, fixed File was not delivered to the client