From 3e247aba0e1be00b0a6e2678c6ee428732db5eef Mon Sep 17 00:00:00 2001 From: Fesiug Date: Sun, 31 Dec 2023 03:32:36 -0500 Subject: [PATCH] Speedometer cleaner --- gamemodes/benny/gamemode/modules/player/cl_hud.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gamemodes/benny/gamemode/modules/player/cl_hud.lua b/gamemodes/benny/gamemode/modules/player/cl_hud.lua index ba850f8..1eb3345 100644 --- a/gamemodes/benny/gamemode/modules/player/cl_hud.lua +++ b/gamemodes/benny/gamemode/modules/player/cl_hud.lua @@ -367,10 +367,12 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function() if true then surface.SetDrawColor( schema("bg") ) - local s_h = ss(18) - surface.DrawRect( b_x, b_y - s_h - ss(4), b_w, s_h ) + local s_h = ss(14) + local s_w = ss(46) + surface.DrawRect( b_x, b_y - s_h - ss(2), s_w, s_h ) - draw.SimpleText( string.format( "%f", p:GetVelocity():Length2D()/39.3701 ):Left( 4 ) .. " m/s", "Benny_18", b_x + ss(4), b_y - s_h - ss(4-2), schema_c("fg") ) + draw.SimpleText( string.format( "%f", p:GetVelocity():Length2D()/39.3701 ):Left( 4 ), "Benny_12", b_x + ss(4), b_y - s_h - ss(2-2), schema_c("fg") ) + draw.SimpleText( "m/s", "Benny_12", b_x + s_w - ss(4), b_y - s_h - ss(2-2), schema_c("fg"), TEXT_ALIGN_RIGHT ) end end