Multiplayer: How to make everyone see a button that changes?

So I’m making a two player multiplayer game and I want to make the player join a side. I made this part inside the MP script for that:

GUILayout.BeginArea(new Rect(175,150,125,150));
				if(taken == false)
				{
					if(GUILayout.Button("Join"))
					{
						taken = true;
						taken2 = false;
					}
				}
		
				if(taken)
				{
					GUILayout.Box(playerName);
				
				}
		GUILayout.EndArea();
		
		GUILayout.BeginArea(new Rect(547,150,125,150));
				if(taken2 == false)
				{
					if(GUILayout.Button("Join"))
					{
						taken2 = true;
						taken = false;
					}
				}
		
				if(taken2)
				{
					GUILayout.Box(playerName);
				
				}
		GUILayout.EndArea();

That seems to work for one player, but the other one doesn’t see the change once a player has joined a side. How can I make them both see where they joined? Hope you understand…

have a dummy rpc function, which has a int parameter. this int will be set to a variable that is being used in the gui to draw those buttons. Initally tht int will be 0 so you would drw both the buttons, once someone take a side, say side one , the rpc would get called and it would set the int to value 1. And now you shd set the side of other player to 2. if the first player takes side 2 the value 2 will be returned and now you have to set the other player to side 1.

well i would have gave you the code even but i dont like giving untested code, and i dont have unity here to check.

Rough layout:

var sideController:int=0;
var sideSelected:Boolean=false;

void OnGUI()
{

   if(sideController==0)
   {
      // display both buttons.....

      // if button one clicked call rpc function with value 1  and vice versa for second. and also make the sideSelected Variable to true.

   }

   if(sideController==1  && sideSelected==false)
   {
      // notify player and make him join the side 2 automatically.
   }

   if(sideController==2  && sideSelected==false)
   {
     // notify player and make him join the side 1 automatically.
   }
}


@RPC
function RPCFunction(int temp)
{
   sideController=temp;
}

i hope it is clear if it is not you have to wait till tmmrrow. i can get u a polished code