diff options
| author | Cristei Gabriel <cristei.g772@gmail.com> | 2023-11-26 14:45:20 +0200 |
|---|---|---|
| committer | Cristei Gabriel <cristei.g772@gmail.com> | 2023-11-26 14:45:20 +0200 |
| commit | a22914735903c4495b3af453668bf316111e5126 (patch) | |
| tree | f14283f87b97df9c1b0c2778487da00554fd4211 /sourcemod/scripting/sm_speedometer.sp | |
| parent | c29160ec194bebb6dbbd18cc078cb6556f937f98 (diff) | |
| parent | 2d51c1ae80693f586f719640571591779bcb0c2d (diff) | |
Merge branch 'main' of https://github.com/navewindre/networkheaven
Diffstat (limited to 'sourcemod/scripting/sm_speedometer.sp')
| -rw-r--r-- | sourcemod/scripting/sm_speedometer.sp | 9 |
1 files changed, 8 insertions, 1 deletions
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) |
