From 20fa7ad57217b298593d859fd7e97009070d3139 Mon Sep 17 00:00:00 2001 From: Promises <21245147+Pr0mises@users.noreply.github.com> Date: Fri, 13 Dec 2019 23:20:45 +0100 Subject: [PATCH 1/2] Fixed channel overflow --- addons/sourcemod/scripting/bTimes-hud-css.sp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/sourcemod/scripting/bTimes-hud-css.sp b/addons/sourcemod/scripting/bTimes-hud-css.sp index de298c4..720d782 100644 --- a/addons/sourcemod/scripting/bTimes-hud-css.sp +++ b/addons/sourcemod/scripting/bTimes-hud-css.sp @@ -14,6 +14,7 @@ ConVar g_cHudRefreshSpeed; ConVar g_cSendKeysAlive; Handle g_hHintTextTimer; +Handle hText; bool g_bReplayLoaded; bool g_bReplay3Loaded; @@ -46,6 +47,9 @@ public void OnPluginStart() g_hVelCookie = RegClientCookie("timer_truevel", "True velocity meter.", CookieAccess_Public); g_hKeysCookie = RegClientCookie("timer_keys", "Show movement keys on screen.", CookieAccess_Public); SetCookiePrefabMenu(g_hVelCookie, CookieMenu_OnOff, "True velocity meter"); + + //Hud Synchronizer + hText = CreateHudSynchronizer(); } public void OnAllPluginsLoaded() @@ -440,12 +444,10 @@ void ShowHudSyncMessage(int client, int target) if(bShowMessage == true) { - Handle hText = CreateHudSynchronizer(); if(hText != INVALID_HANDLE) { SetHudTextParams(0.005, 0.0, g_cHudRefreshSpeed.FloatValue, 255, 255, 255, 255); ShowSyncHudText(client, hText, sSyncMessage); - CloseHandle(hText); } } } @@ -655,4 +657,4 @@ void SendKeysMessage(int client) public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon, int &subtype, int &cmdnum, int &tickcount, int &seed, int mouse[2]) { SendKeysMessage(client); -} \ No newline at end of file +} From 5d0887308eb1455a0748a33d7c56ca76c932b2a4 Mon Sep 17 00:00:00 2001 From: Promises <21245147+Pr0mises@users.noreply.github.com> Date: Fri, 13 Dec 2019 23:24:10 +0100 Subject: [PATCH 2/2] Fixed channel overflow CSGO --- addons/sourcemod/scripting/bTimes-hud.sp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/sourcemod/scripting/bTimes-hud.sp b/addons/sourcemod/scripting/bTimes-hud.sp index 8db359f..9b17e5a 100644 --- a/addons/sourcemod/scripting/bTimes-hud.sp +++ b/addons/sourcemod/scripting/bTimes-hud.sp @@ -18,6 +18,7 @@ int g_ExpectedValue[3]; int g_FadeSpeed; Handle g_hVelCookie; +Handle hText; ConVar g_cFadeSpeed; ConVar g_cHudSyncPos[2]; @@ -62,6 +63,7 @@ public void OnPluginStart() g_hVelCookie = RegClientCookie("timer_truevel", "True velocity meter.", CookieAccess_Public); SetCookiePrefabMenu(g_hVelCookie, CookieMenu_OnOff, "True velocity meter"); + hText = CreateHudSynchronizer(); } public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) @@ -580,12 +582,10 @@ void ShowSyncMessage(int client, int target) if(bShowMessage == true) { - Handle hText = CreateHudSynchronizer(); if(hText != INVALID_HANDLE) { SetHudTextParams(g_cHudSyncPos[0].FloatValue, g_cHudSyncPos[1].FloatValue, 3.0, 255, 255, 255, 255); ShowSyncHudText(client, hText, sSyncMessage); - CloseHandle(hText); } } } @@ -655,4 +655,4 @@ void SpecCountToArrays(int[] clients, int[] admins) } } } -} \ No newline at end of file +}