IsPlayerHudComponentVisible: Difference between revisions
Jump to navigation
Jump to search
UniOnDennis (talk | contribs) No edit summary |
|||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Server client function}} | |||
This function can be used to check wether an hud component is visable or not. | |||
==Syntax== | |||
<section name="Server" class="server" show="true"> | |||
<syntaxhighlight lang="lua"> | |||
bool isPlayerHudComponentVisible( player thePlayer, string component ) | |||
</syntaxhighlight> | |||
===Required Arguments=== | |||
*'''thePlayer:''' The player element for which you wish to show/hide a HUD component | |||
*'''component:''' The component you wish to show or hide. Valid values are: | |||
:*'''ammo:''' The display showing how much ammo the player has in their weapon | |||
:*'''area_name:''' The text that appears containing the name of the area a player has entered | |||
:*'''armour:''' The display showing the player's armor | |||
:*'''breath:''' The display showing the player's breath | |||
:*'''clock:''' The display showing the in-game time | |||
:*'''health:''' The display showing the player's health | |||
:*'''money:''' The display showing how much money the player has | |||
:*'''radar:''' The bottom-left corner miniradar | |||
:*'''vehicle_name:''' The text that appears containing the player's vehicle name when the player enters a vehicle | |||
:*'''weapon:''' The display showing the player's weapon | |||
{{New feature|3.0110|1.1| | |||
:*'''radio:''' The display showing the radio label | |||
:*'''wanted:''' The display showing the player's wanted level | |||
:*'''crosshair:''' The weapon crosshair and sniper scope | |||
}} | |||
</section> | |||
<section name="Client" class="client" show="true"> | |||
<syntaxhighlight lang="lua"> | |||
bool isPlayerHudComponentVisible( string component ) | |||
</syntaxhighlight> | |||
===Required Arguments=== | |||
*'''component:''' The component you wish to show or hide. Valid values are: | |||
:*'''ammo:''' The display showing how much ammo the player has in their weapon | |||
:*'''area_name:''' The text that appears containing the name of the area a player has entered | |||
:*'''armour:''' The display showing the player's armor | |||
:*'''breath:''' The display showing the player's breath | |||
:*'''clock:''' The display showing the in-game time | |||
:*'''health:''' The display showing the player's health | |||
:*'''money:''' The display showing how much money the player has | |||
:*'''radar:''' The bottom-left corner miniradar | |||
:*'''vehicle_name:''' The text that appears containing the player's vehicle name when the player enters a vehicle | |||
:*'''weapon:''' The display showing the player's weapon | |||
{{New feature/item|3.0110|1.1|| | |||
:*'''radio:''' The display showing the radio label | |||
:*'''wanted:''' The display showing the player's wanted level | |||
:*'''crosshair:''' The weapon crosshair and sniper scope | |||
}} | |||
</section> | |||
===Returns=== | |||
Returns ''true'' if the component is visable, ''false'' if not. | |||
==Example== | |||
<syntaxhighlight lang="lua"> | |||
-- Todo | |||
</syntaxhighlight> | |||
==See Also== | |||
{{Player_functions}} |
Revision as of 18:17, 18 February 2013
This function can be used to check wether an hud component is visable or not.
Syntax
Click to collapse [-]
Serverbool isPlayerHudComponentVisible( player thePlayer, string component )
Required Arguments
- thePlayer: The player element for which you wish to show/hide a HUD component
- component: The component you wish to show or hide. Valid values are:
- ammo: The display showing how much ammo the player has in their weapon
- area_name: The text that appears containing the name of the area a player has entered
- armour: The display showing the player's armor
- breath: The display showing the player's breath
- clock: The display showing the in-game time
- health: The display showing the player's health
- money: The display showing how much money the player has
- radar: The bottom-left corner miniradar
- vehicle_name: The text that appears containing the player's vehicle name when the player enters a vehicle
- weapon: The display showing the player's weapon
- radio: The display showing the radio label
- wanted: The display showing the player's wanted level
- crosshair: The weapon crosshair and sniper scope
Click to collapse [-]
Clientbool isPlayerHudComponentVisible( string component )
Required Arguments
- component: The component you wish to show or hide. Valid values are:
- ammo: The display showing how much ammo the player has in their weapon
- area_name: The text that appears containing the name of the area a player has entered
- armour: The display showing the player's armor
- breath: The display showing the player's breath
- clock: The display showing the in-game time
- health: The display showing the player's health
- money: The display showing how much money the player has
- radar: The bottom-left corner miniradar
- vehicle_name: The text that appears containing the player's vehicle name when the player enters a vehicle
- weapon: The display showing the player's weapon
- radio: The display showing the radio label
- wanted: The display showing the player's wanted level
- crosshair: The weapon crosshair and sniper scope
Returns
Returns true if the component is visable, false if not.
Example
-- Todo
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