SetPlayerNametagShowing: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 22: | Line 22: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
root = getRootElement ( ) | root = getRootElement ( ) | ||
--Store all the players in the server into | -- Store all the players in the server into a table | ||
players = getElementsByType ( "player" ) | players = getElementsByType ( "player" ) | ||
Revision as of 21:40, 15 August 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 successful, false otherwise
Example
This script will turn off player tags for everyone
root = getRootElement ( ) -- Store all the players in the server into a table players = getElementsByType ( "player" ) function ResourceStart ( name, root ) for k,v in ipairs ( players ) do -- for all the players in the table setPlayerNametagShowing ( v, false ) -- turn off their nametag end end addEventHandler ( "onResourceStart", root, ResourceStart ) function PlayerJoin () -- Whoever joins the server should also have their nametags deactivated setPlayerNametagShowing ( source, false ) end addEventHandler ( "onPlayerJoin", root, PlayerJoin )
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