View Single Post
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 08-02-2022 , 11:34   Re: [L4D2] HUD Server Logo
Reply With Quote #16

Quote:
Originally Posted by Marttt View Post
Probably something like this:

local hostname = Convars.GetStr("hostname");
and use it inside the hud
like this?

Code:
local hostname = Convars.GetStr("hostname");

HUDTable <-
{
	Fields = 
	{
		hud = { slot = HUD_FAR_RIGHT, special = hostname, flags = HUD_FLAG_ALIGN_RIGHT, name = "host" }
	}
}


HUDSetLayout(HUDTable)
     HUDPlace( HUD_FAR_RIGHT, 0.0100, 0.0350, 0.0595, 0.075 )
or this

Code:
local hostname = Convars.GetStr("hostname");

HUDTable <-
{
	Fields = 
	{
	     hud   = { slot = HUD_RIGHT_TOP, hostname  = Convars.GetStr("hostname");, name = "HUD" }
	}
}


HUDSetLayout(HUDTable)
     HUDPlace( HUD_RIGHT_TOP, 0.0100, 0.0350, 0.0595, 0.075 )

Last edited by GoGetSomeSleep; 08-02-2022 at 11:37.
GoGetSomeSleep is offline