isGM: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
(Player parameter not yet added)
Line 9: Line 9:
isGM()
isGM()
</source>
</source>
 
{{ProposedChange|
b90+ allows to add a string parameter 'player' to check if the player is a GM or not.
<source lang="mtmacro" line>
<source lang="mtmacro" line>
isGM('player')
isGM(player)
</source>
</source>'''Parameters'''
 
{{param|player|player's name as a string to check if he is a GM or not.}}}}


|example=
|example=
Line 20: Line 19:
I am a [r,if(isGM()): "GM"; "Player"]
I am a [r,if(isGM()): "GM"; "Player"]
</source>
</source>
 
{{ProposedChange|
 
 
b90+
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: player = getPlayerName()] is a [r,if(isGM(player)): "GM"; "Player"]
[r: player = getPlayerName()] is a [r,if(isGM(player)): "GM"; "Player"]
</source>
</source>
Note: this macro does not make much sense, since it could be achieved just as well without using the parameter.  
Note: this macro does not make much sense, since it could be achieved just as well without using the parameter.}}
 


|changes=
|changes=
*  '''b90''' added player parameter
{{ProposedChange| *  '''b90''' - Added {{code|player}} parameter}}
}}
}}
[[Category:Permission Function]]
[[Category:Permission Function]]

Revision as of 06:31, 12 July 2013

isGM() Function

Introduced in version 1.3b48
Returns true(1) if the player is a GM or false(0) if they are not.

Usage

isGM()

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

isGM(player)
Parameters
  • player - player's name as a string to check if he is a GM or not.

Example

I am a [r,if(isGM()): "GM"; "Player"]

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

[r: player = getPlayerName()] is a [r,if(isGM(player)): "GM"; "Player"]
Note: this macro does not make much sense, since it could be achieved just as well without using the parameter.


Version Changes

 Note: This refers to a proposed change that has not been implemented in the main code base yet.
 Details:
* b90 - Added player parameter