GetPlayerByUsername

From King Arthur's Gold Wiki
Revision as of 19:22, 27 August 2012 by Shadlington (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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
}