GetPlayerByUsername

From King Arthur's Gold Wiki
Jump to: navigation, search

Returns a reference to the CPlayer that has the given username, if one currently exists, otherwise it returns null.

CPlayer@ getPlayerByUsername( string name )

Usage example:

CPlayer@ player = getPlayerByUsername(username);
if (player !is null)
{
  // Do stuff with the player
}