mirror of
https://github.com/Michatec/xhud.git
synced 2026-03-31 23:46:29 +02:00
Players Online Stats added and some bugfixes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user