isGM: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version and corrected example.)
No edit summary
Line 9: Line 9:
isGM()
isGM()
</source>
</source>
b90+ allows to add a string parameter 'player' to check if the player is a GM or not.
<source lang="mtmacro" line>
isGM('player')
</source>


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

Revision as of 10:11, 7 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()

b90+ allows to add a string parameter 'player' to check if the player is a GM or not.

isGM('player')

Example

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


b90+

[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.