getPlayerName: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function getPlayerName== {{ProposedChange}} Returns the name of the player for the client that it executes on. <source lang="mtmacro" line> [h: name = getPlayerName()] </source> T...)
 
No edit summary
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Function getPlayerName==
{{MacroFunction
{{ProposedChange}}
|name=getPlayerName
Returns the name of the player for the [[client]] that it executes on.
|version=1.3b48
|description=Returns the name of the player for the [[Introduction to Game Hosting#Architecture|Client]] that it executes on.


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


 
|example=
To display the ids of all of the [[Token:NPC token|NPC token]]s on the current [[Map:map|map]] use.
<syntaxhighlight 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!
</syntaxhighlight>
</source>
}}
[[Category:Miscellaneous Function]]

Latest revision as of 23:59, 24 April 2023

getPlayerName() Function

Introduced in version 1.3b48
Returns the name of the player for the Client that it executes on.

Usage

getPlayerName()

Example

/say My name is [r: getPlayerName()], nice to meet you!