Players Online Stats added and some bugfixes

This commit is contained in:
2026-02-15 20:21:34 +01:00
parent a99607dd0a
commit 19d839b4d8
5 changed files with 80 additions and 23 deletions

View File

@@ -72,7 +72,7 @@ if not IsDuplicityVersion() then
end
SendMessage('setPlayerId', cache.serverId)
if GetConvar('hud:logo', 'true') == 'true' then
SendMessage('setLogo')
end
@@ -81,6 +81,15 @@ if not IsDuplicityVersion() then
local hPosition = GetConvar('hud:hposition', 'center')
SendMessage('setPosition', { v = position, h = hPosition })
local players = #GetActivePlayers()
SendMessage('setPlayerCount', players)
CreateThread(function()
while HUD do
Wait(30000)
SendMessage('setPlayerCount', #GetActivePlayers())
end
end)
HUD = true
SendMessage('toggleHud', HUD)
end
@@ -90,7 +99,6 @@ if not IsDuplicityVersion() then
InitializeHUD()
end)
-- Commands
RegisterCommand('togglehud', function()
HUD = not HUD
SendMessage('toggleHud', HUD)