<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nerox</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nerox"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Nerox"/>
	<updated>2026-04-03T23:51:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerHudComponentVisible&amp;diff=41090</id>
		<title>SetPlayerHudComponentVisible</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerHudComponentVisible&amp;diff=41090"/>
		<updated>2014-07-31T10:32:55Z</updated>

		<summary type="html">&lt;p&gt;Nerox: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{Note|This function is identical to showPlayerHudComponent}}&lt;br /&gt;
This function will show or hide a part of the player's HUD. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPlayerHudComponentVisible ( player thePlayer, string component, bool show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[player]]:showHudComponent||}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player element for which you wish to show/hide a HUD component&lt;br /&gt;
*'''component:''' The component you wish to show or hide. Valid values are:&lt;br /&gt;
:*'''ammo:''' The display showing how much ammo the player has in their weapon&lt;br /&gt;
:*'''area_name:''' The text that appears containing the name of the area a player has entered&lt;br /&gt;
:*'''armour:''' The display showing the player's armor&lt;br /&gt;
:*'''breath:''' The display showing the player's breath&lt;br /&gt;
:*'''clock:''' The display showing the in-game time&lt;br /&gt;
:*'''health:''' The display showing the player's health&lt;br /&gt;
:*'''money:''' The display showing how much money the player has&lt;br /&gt;
:*'''radar:''' The bottom-left corner miniradar&lt;br /&gt;
:*'''vehicle_name:''' The text that appears containing the player's vehicle name when the player enters a vehicle&lt;br /&gt;
:*'''weapon:''' The display showing the player's weapon&lt;br /&gt;
{{New feature|3.0110|1.1|&lt;br /&gt;
:*'''radio:''' The display showing the radio label&lt;br /&gt;
:*'''wanted:''' The display showing the player's wanted level&lt;br /&gt;
:*'''crosshair:''' The weapon crosshair and sniper scope&lt;br /&gt;
:*'''weapon:''' The image of the weapon which appears at the top right of the screen&lt;br /&gt;
:*'''all:''' All of the above at the same time&lt;br /&gt;
}}&lt;br /&gt;
*'''show:''' Specify if the component should be shown (''true'') or hidden (''false'')&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPlayerHudComponentVisible ( string component, bool show )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''component:''' The component you wish to show or hide. Valid values are:&lt;br /&gt;
:*'''ammo:''' The display showing how much ammo the player has in their weapon&lt;br /&gt;
:*'''area_name:''' The text that appears containing the name of the area a player has entered&lt;br /&gt;
:*'''armour:''' The display showing the player's armor&lt;br /&gt;
:*'''breath:''' The display showing the player's breath&lt;br /&gt;
:*'''clock:''' The display showing the in-game time&lt;br /&gt;
:*'''health:''' The display showing the player's health&lt;br /&gt;
:*'''money:''' The display showing how much money the player has&lt;br /&gt;
:*'''radar:''' The bottom-left corner miniradar&lt;br /&gt;
:*'''vehicle_name:''' The text that appears containing the player's vehicle name when the player enters a vehicle&lt;br /&gt;
:*'''weapon:''' The display showing the player's weapon&lt;br /&gt;
{{New feature/item|3.0110|1.1||&lt;br /&gt;
:*'''radio:''' The display showing the radio label&lt;br /&gt;
:*'''wanted:''' The display showing the player's wanted level&lt;br /&gt;
:*'''crosshair:''' The weapon crosshair and sniper scope&lt;br /&gt;
:*'''weapon:''' The image of the weapon which appears at the top right of the screen&lt;br /&gt;
:*'''all:''' All of the above at the same time&lt;br /&gt;
}}&lt;br /&gt;
*'''show:''' Specify if the component should be shown (''true'') or hidden (''false'')&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the component was shown or hidden succesfully, ''false'' if an invalid argument was specified.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.3.2|1.3.2}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example hides the ammo and weapon displays for players when they join.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Hide some of the hud components when a player joins the server&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerJoin&amp;quot;, root, &lt;br /&gt;
    function ()&lt;br /&gt;
        setPlayerHudComponentVisible ( source, &amp;quot;ammo&amp;quot;, false )    -- Hide the ammo displays for the newly joined player&lt;br /&gt;
        setPlayerHudComponentVisible ( source, &amp;quot;weapon&amp;quot;, false )  -- Hide the weapon displays for the newly joined player&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player_functions}}&lt;/div&gt;</summary>
		<author><name>Nerox</name></author>
	</entry>
</feed>