This commit is contained in:
Jonny_Bro (Nikita) 2024-03-07 20:21:11 +05:00
parent c88052cf12
commit 91444c56cb
No known key found for this signature in database
GPG key ID: 39FC25CDC139CFC8
4 changed files with 13 additions and 0 deletions

View file

@ -156,6 +156,9 @@ beatrun.toolsmenu.misc.propspawndesc=Allows players without admin rights to spaw
beatrun.toolsmenu.misc.overdrivemp=Overdrive in Multiplayer
beatrun.toolsmenu.misc.overdrivempdesc=Allows Overdrive usage on the server
beatrun.toolsmenu.misc.healthregen=Health Regen
beatrun.toolsmenu.misc.healthregendesc=Toggles Health Regeneration
# Tools Menu Moves Section
beatrun.toolsmenu.moves.name=Moves
beatrun.toolsmenu.moves.desc=Moves Settings

View file

@ -156,6 +156,9 @@ beatrun.toolsmenu.misc.propspawndesc=Позволяет создавать иг
beatrun.toolsmenu.misc.overdrivemp=Overdrive в Мультиплеере
beatrun.toolsmenu.misc.overdrivempdesc=Разрешает использование Overdrive в мультиплеере
beatrun.toolsmenu.misc.healthregen=Регенерация здоровья
beatrun.toolsmenu.misc.healthregendesc=Переключает регенерацию здоровья
# Tools Menu Moves Section
beatrun.toolsmenu.moves.name=Движения
beatrun.toolsmenu.moves.desc=Настройки движений

View file

@ -251,6 +251,9 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
panel:CheckBox("#beatrun.toolsmenu.misc.overdrivemp", "Beatrun_AllowOverdriveInMultiplayer")
panel:ControlHelp("#beatrun.toolsmenu.misc.overdrivempdesc")
panel:CheckBox("#beatrun.toolsmenu.misc.healthregen", "Beatrun_HealthRegen")
panel:ControlHelp("#beatrun.toolsmenu.misc.healthregendesc")
end)
spawnmenu.AddToolMenuOption("Beatrun", "Server", "beatrun_moves", "#beatrun.toolsmenu.moves.name", "", "", function(panel)

View file

@ -77,7 +77,11 @@ if CLIENT then
end
if SERVER then
local healthRegen = CreateConVar("Beatrun_HealthRegen", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
hook.Add("PlayerPostThink", "HealthRegen", function(ply)
if not healthRegen:GetBool() then return end
if not ply.LastHP then
ply.LastHP = ply:Health()
ply.RegenTime = 0