getPlayerName: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Applied Template:MacroFunction)
Line 1: Line 1:
==Function getPlayerName==
{{MacroFunction
Returns the name of the player for the [[client]] that it executes on.
|name=getPlayerName
 
|description=Returns the name of the player for the [[Client]] that it executes on.


|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: name = getPlayerName()]
[h: name = getPlayerName()]
</source>
</source>


 
|example=
To display the ids of all of the [[Token:NPC token|NPC token]]s on the current [[Map:map|map]] use.
To display the ids of all of the [[NPC Token|NPC token]]s on the current [[Map|map]] use.
<source lang="mtmacro" line>
<source lang="mtmacro" line>
/say My name is [r: getPlayerName()] nice to meet you!
/say My name is [r: getPlayerName()] nice to meet you!
</source>
</source>
}}
[[Category:Miscellaneous Function]]

Revision as of 03:22, 8 March 2009

getPlayerName() Function

Returns the name of the player for the Client that it executes on.

Usage

[h: name = getPlayerName()]

Example

To display the ids of all of the NPC tokens on the current map use.
/say My name is [r: getPlayerName()] nice to meet you!