SetPlayerNametagShowing: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
<!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | ||
Use this to define whether the player's name tag is visible or invisible. | |||
==Syntax== | ==Syntax== | ||
Line 15: | Line 15: | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if tag is showing, ''false'' otherwise | Returns ''true'' if tag is showing, ''false'' otherwise | ||
==Example== | ==Example== | ||
Line 45: | Line 45: | ||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} | ||
Revision as of 02:03, 11 April 2007
Use this to define whether the player's name tag is visible or invisible.
Syntax
bool setPlayerNametagShowing ( player thePlayer, bool showing )
Required Arguments
- thePlayer: Define the player whos tag visiblity status you want to change
- showing: Use true or false to show/hide the tag
Returns
Returns true if tag is showing, false otherwise
Example
This script will turn off player tags for everyone
root = getRootElement () players = {} --Make a players varible and define it as a table players = getElementsByType ( "player" ) --Store all the players in the server into the table addEventHandler ( "onResourceStart", root, "ResourceStart" ) function ResourceStart ( name, root ) for k,v in players do --for all the players in the table setPlayerNametagShowing ( v, false ) --turn off their nametag end end addEventHandler ( "onPlayerJoin", root, "PlayerJoin" ) function PlayerJoin () setPlayerNametagShowing ( source, false ) --Whoever joins the server should also have their nametags deactivated end
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState