g_pPlayer <- FindLocalPlayer();
function onScriptLoad()
{
local xPos = VectorScreen( 3, ScreenHeight - 40 );
local yPos = VectorScreen( 3, ScreenHeight - 28 );
local zPos = VectorScreen( 3, ScreenHeight - 16 );
local PingPos = VectorScreen( 3, ScreenHeight - 62 );
local xSize = ScreenSize( 100,3 );
local ySize = ScreenSize( 100,3 );
local zSize = ScreenSize( 100,3 );
local PingSize = ScreenSize( 100,3 );
xText <- GUILabel( xPos, xSize, "" );
yText <- GUILabel( yPos, ySize, "" );
zText <- GUILabel( zPos, zSize, "" );
PingText <- GUILabel( PingPos, PingSize, "" );
xText.FontName = "Verdana";
yText.FontName = "Verdana";
zText.FontName = "Verdana";
PingText.FontName = "Verdana";
xText.FontSize = 9;
yText.FontSize = 9;
zText.FontSize = 9;
PingText.FontSize = 9;
xText.TextColour = Colour( 180, 180, 180 );
yText.TextColour = Colour( 180, 180, 180 );
zText.TextColour = Colour( 180, 180, 180 );
PingText.TextColour = Colour( 180, 180, 180 );
AddGUILayer( xText );
AddGUILayer( yText );
AddGUILayer( zText );
AddGUILayer( PingText );
}
function onClientRender()
{
xText.Text = "X: " + g_pPlayer.Pos.x + "";
yText.Text = "Y: " + g_pPlayer.Pos.y + "";
zText.Text = "Z: " + g_pPlayer.Pos.z + "";
PingText.Text = "Ping: " + g_pPlayer.Ping + "";
}