Retrieve the player id for the current user in the room.
This id is 1-based (player 1, player 2, etc.), but if the user is a spectator its value is -1.
This id is 1-based (player 1, player 2, etc.), but if the user is a spectator its value is -1.


The player id for the current user

Version:
SmartFoxServer Basic / Pro
SmartFoxServer Basic / Pro


if (room.IsGame()) Debug.WriteLine("My player id in this room: " + room.GetMyPlayerIndex());