From 2d51c1ae80693f586f719640571591779bcb0c2d Mon Sep 17 00:00:00 2001 From: navewindre Date: Sun, 26 Nov 2023 13:36:02 +0100 Subject: aye aye --- sourcemod/scripting/sm_speedometer.sp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sourcemod/scripting/sm_speedometer.sp') diff --git a/sourcemod/scripting/sm_speedometer.sp b/sourcemod/scripting/sm_speedometer.sp index ed60167..a52d742 100644 --- a/sourcemod/scripting/sm_speedometer.sp +++ b/sourcemod/scripting/sm_speedometer.sp @@ -56,7 +56,7 @@ public OnPluginStart() HookConVarChange(g_hMethod, Action_OnSettingsChange); g_hFactor = CreateConVar("sm_speedometer_factor", "0.0", "Optional numerical value that can be used to derive real world units from in-game velocity.", FCVAR_NONE, true, 0.0); HookConVarChange(g_hFactor, Action_OnSettingsChange); - g_hDisplay = CreateConVar("sm_speedometer_area", "0", "Determines printing area functionality. (0 = Hint, 1 = Center, 2 = Hud Hint)", FCVAR_NONE, true, 0.0, true, 2.0); + g_hDisplay = CreateConVar("sm_speedometer_area", "0", "Determines printing area functionality. (0 = Hint, 1 = Center, 2 = Hud Hint, 3 = hud panel)", FCVAR_NONE, true, 0.0, true, 3.0); HookConVarChange(g_hDisplay, Action_OnSettingsChange); g_hFastest = CreateConVar("sm_speedometer_fastest", "1", "If enabled, the player with the highest velocity will be displayed at the end of the round.", FCVAR_NONE, true, 0.0, true, 1.0); HookConVarChange(g_hFastest, Action_OnSettingsChange); @@ -336,6 +336,13 @@ public Action:OnPlayerRunCmd(iClient, &buttons, &impulse, Float:vel[3], Float:an BfWriteString(hTemp, sBuffer); EndMessage(); } + case 3: + { + Format(sBuffer, sizeof(sBuffer), "%T", "Phrase_Velocity_Display", i, _fVelocity); + + SetHudTextParams(-1.0, 0.85, 0.05, 255, 255, 255, 255, 0, 0.0, 0.0, 0.0); + ShowHudText(i, 1, sBuffer); + } } if(g_bShowFastest && _fVelocity > g_fFastestVelocity) -- cgit v1.2.3