player.getInfo

From RPTools Wiki
(Redirected from Player.getInfo)
Jump to navigation Jump to search

 Note: This refers to a proposed change that has not been implemented in the main code base yet.

player.getInfo() Function

Introduced in version 1.10.0
Last checked for compatibility with version 1.10.0
Returns information about the current or specified player as a JSON object.

Usage

player.getInfo() - Info on current player.
player.getInfo(PlayerName) - Info on the specified player. Can only be used in Trusted macros.

Parameters

  • PlayerName - String containing the name of a player in the databse.

Example

Outputs current player info. From GM client in this case.
Info: [r: player.getInfo()]

Returns:

Info: {"name":"GM","role":"GM","connected":true}

Outputs info for player George who is not connected.

Info: [r: player.getInfo("George")]

Returns:

Info: {"name":"George","role":"PLAYER","connected":false}

See Also

Version Changes

  • 1.10.0 - First added.