GetPlayerHudComponentProperty

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r22868:
This function gets the value of the specified HUD property.

Syntax

mixed getPlayerHudComponentProperty (string component, string property)

OOP Syntax Help! I don't understand this!

Method: player:getHudComponentProperty(...)
Counterpart: setPlayerHudComponentProperty


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

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.

Example

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

See Also