Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions addons/sourcemod/scripting/bTimes-hud-css.sp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ConVar g_cHudRefreshSpeed;
ConVar g_cSendKeysAlive;

Handle g_hHintTextTimer;
Handle hText;

bool g_bReplayLoaded;
bool g_bReplay3Loaded;
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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);
}
}
6 changes: 3 additions & 3 deletions addons/sourcemod/scripting/bTimes-hud.sp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ int g_ExpectedValue[3];
int g_FadeSpeed;

Handle g_hVelCookie;
Handle hText;

ConVar g_cFadeSpeed;
ConVar g_cHudSyncPos[2];
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -655,4 +655,4 @@ void SpecCountToArrays(int[] clients, int[] admins)
}
}
}
}
}