Stamina set on spawn & in the HUD

This commit is contained in:
Fesiug 2023-11-28 23:11:10 -05:00
parent 5520c921c1
commit b6b9c4d017
2 changed files with 3 additions and 2 deletions

View File

@ -281,8 +281,7 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function()
render.SetScissorRect( 0, 0, 0, 0, false ) -- Disable after you are done
if true then -- Stamina
local perc = CurTime()*0.5 % 2
if perc > 1 then perc = 2-perc end
local perc = p:GetStamina()
for i=1, 4 do
local localperc = math.Clamp( math.Remap( perc, (0.25*(i-1)), (0.25*(i)), 0, 1 ), 0, 1 )
surface.SetDrawColor( scheme["fg"] )

View File

@ -7,6 +7,8 @@ function GM:PlayerSpawn( ply )
ply:SetPlayerColor( Vector( 0.275, 0.2, 0.145 ) )
ply:Give( "benny" )
ply:SetStamina( 1 )
ply:SetCrouchedWalkSpeed( 0.3 )
ply:SetDuckSpeed( 0.1 )
ply:SetUnDuckSpeed( 0.1 )