diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua index 7a8be0f..537be7b 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua @@ -246,6 +246,8 @@ function CourseHUD() text = speed .. " km/h" local w, _ = surface.GetTextSize(text) + w = w or 0 + local r, g, b, a = string.ToColor(GetConVar("Beatrun_HUDTextColor"):GetString()) surface.SetDrawColor(255, 255, 255, 255) @@ -267,6 +269,8 @@ function CourseHUD() if timealpha > 0 then local w, _ = surface.GetTextSize(timetext) + w = w or 0 + timealpha = math.max(0, timealpha - FrameTime() * 250) timecolor.a = math.min(255, timealpha) @@ -362,4 +366,4 @@ net.Receive("BeatrunSpawn", function() if LocalPlayer().GetInfoNum then StartCourse(spawntime) end -end) \ No newline at end of file +end)