SmartFoxServer Silverlight API
SetMyPlayerIndex Method (id)
Namespaces ► SmartFoxClientAPI.Data ► Room ► SetMyPlayerIndex(Int32)

Set the myPlayerId property.
Each room where the current client is connected contains a myPlayerId (if the room is a gameRoom).
myPlayerId == -1 ... user is a spectator
myPlayerId > 0 ... user is a player

Declaration Syntax

C# | Visual Basic | Visual C++

    public void SetMyPlayerIndex(
    	int id
    )

    Public Sub SetMyPlayerIndex ( _
    	id As Integer _
    )

    public:
    void SetMyPlayerIndex(
    	int id
    )

Parameters

id (Int32)
  the myPlayerId value

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)