g_option3 = GUILabel();
function Script::ScriptLoad( )
{
//score message ( I just copied the code for showing scores. )
g_option3.Text = "Current Score: Reds: 0 || Blues: 0";
g_option3.TextColour = Colour( 255, 0, 255 );
g_option3.FontSize = 15;
g_option3.Pos = VectorScreen( sizex * 0.8, sizey / 2 - 65 );
}
function Server::ServerData( stream )
{
local strint = stream.ReadInt( );
switch( strint.tointeger( ) )
{
case 4 :
local txt = stream.ReadString();
g_option3.Text = txt;
break;
}
}
function GUITeamScore()
{
// this function will be called everytime the scores change.
local data = Stream();
data.WriteInt( 4 );
data.WriteString( "Current Score: Reds: " + RedScore + " || Blues: " + BlueScore );
data.SendStream( null );
}