Lua:AddHudIconToAll

From Fortress Forever Wiki
Jump to: navigation, search


AddHudIconToAll

Adds an icon to the screen of every player on the server

Usage

AddHudIconToAll(material, icon_id, x, y, w, h, align)

Input

  • material(string) the name of a vmt file to serve as the icon <ref name="material">the file name must end in .vtf; however it is actually looking up a vmt file. This .vmt must be located in located in FortressForever\materials\vgui\.</ref>
  • icon_id(string) a name for this icon (so we can remove it later)
  • x(integer) horizontal position
  • y(integer) vertical position
  • w(integer) width of the icon
  • h(integer) height of the icon
  • align(integer) x alignment options <ref name="units">Verify: what units are used for icon size and position?</ref>
    • 0: align to left
    • 1: align to right
    • 2: align to left of center
    • 3: align to right of center

Output

Returns: nothing

Example

AddHudIconToAll("minimap.vtf", "mapoverlay", 0, 40, 128, 128, 1 )

Template:Reflist