SmartFoxServer Silverlight API
GetPlayerId Method
NamespacesSmartFoxClientAPI.DataUserGetPlayerId()()()
Retrieve the player id of the user.
The user must be a player inside a game room for this method to work properly.
This id is 1-based (player 1, player 2, etc.), but if the user is a spectator its value is -1.
Declaration Syntax
C#Visual BasicVisual C++
public int GetPlayerId()
Public Function GetPlayerId As Integer
public:
int GetPlayerId()
Return Value
The current player id
Remarks
Version:
SmartFoxServer Basic / Pro
Examples
CopyC#
Debug.WriteLine("The user's player id is " + user.GetPlayerId());

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