getPlayerHudComponentProperty | Multi Theft Auto: Wiki Skip to content

getPlayerHudComponentProperty

Client-side
Server-side
Shared

Pair: setPlayerHudComponentProperty

Manual Review Required

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


This function gets the value of the specified HUD property.

OOP Syntax Help! I don't understand this!

  • Method:player:getHudComponentProperty(...)

Syntax

mixed getPlayerHudComponentProperty ( string component, string property )
Required Arguments
  • component: The component whose property you want to retrieve. See HUD Components .
  • property: The name of the property you want to read. See HUD Properties .

Returns

  • mixed: value

Returns different values depending on the type. It can be bool , string , int , int int , or int int int int . If something goes wrong, it returns false .

Code Examples

shared
local r, g, b, a = getPlayerHudComponentProperty('clock', 'fillColor')
local w, h = getPlayerHudComponentProperty('health', 'size')
local outline = getPlayerHudComponentProperty('money', 'fontOutline')

See Also