ShowPlayerHudComponent: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
JonChappell (talk | contribs) mNo edit summary |
||
Line 21: | Line 21: | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if the | Returns ''true'' if the component was shown or hidden succesfully, ''false'' if an invalid argument was specified. | ||
==Example== | ==Example== |
Revision as of 13:10, 8 September 2006
This function will show or hide a part of the player's HUD.
Syntax
bool showPlayerHudComponent ( player thePlayer, string component, bool show )
Required Arguments
- thePlayer: description
- 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
- weapon: The display showing the player's weapon
- health: The display showing the player's health
- breath: The display showing the player's breath
- armour: The display showing the player's armor
- money: The display showing how much money the player has
- vehicle_name: The text that appears containing the player's vehicle name when the player enters a vehicle
- area_name: The text that appears containing the name of the area a player has entered
- show: Specify if the componenet should be shown (true) or hidden (false)
Returns
Returns true if the component was shown or hidden succesfully, false if an invalid argument was specified.
Example
This example hides the ammo and weapon displays for players when they join.
-- Make our hudChanger function called when the player joins addEventHandler ( "onPlayerJoin", getRootElement(), "hudChanger" ) function hudChanger () showPlayerComponent ( source, "ammo", false ) -- Hide the ammo displays for the newly joined player showPlayerComponent ( source, "weapon", false ) -- Hide the weapon displays for the newly joined player 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