KrooB

  • Jr. Member
  • WE ARE BEST
  • Posts: 71
This is working ?
«  »
Client side


Code: [Select]
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;
}
}

Server Side

Code: [Select]
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 );
}

https://forum.vc-mp.org/?topic=4203.msg31075#msg31075
we are new because we are watching the old ???