Networked if statement

Okey, I have small problem with multiplayer. I need if statement that works like this:
When player 1 and player 2 are both in same room at the same time, something happens.
So basically like this:

if(Player1 == true && Player2 == true){

(not real code, just example)

Max player amount is 2 so not need to think other players. I can use RPC:s, but I dont know how I can make thing like that with RPC:s.

EDIT: Okey… I think I just thinked this way too complicated way, I can do this even without networking :).

Hey. I’m not sure if this is what you mean but this is what I was thinking:

if(Player1 == true && Player2 == true){

    networkView.RPC("DoSomething", RPCMode.All, "Hello"); //Sends "Hello" in the "DoSomething" RPC to everyone who is connected.

function DoSomething (message : String){

    //Prints "Hello" to the console for both players


Sorry if this isn’t what you mean.