setPlayerHudComponentVisible | Multi Theft Auto: Wiki Skip to content

setPlayerHudComponentVisible

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function will show or hide a part of the player's HUD.

Syntax

setPlayerHudComponentVisible ( )

Code Examples

server

This example hides the ammo and weapon displays for players when they join.

-- Hide some of the hud components when a player joins the server
addEventHandler ( "onPlayerJoin", root,
function ()
setPlayerHudComponentVisible ( source, "ammo", false ) -- Hide the ammo displays for the newly joined player
setPlayerHudComponentVisible ( source, "weapon", false ) -- Hide the weapon displays for the newly joined player
end
)

See Also