Difference between revisions of "Lua:AddHudIcon"
From Fortress Forever Wiki
Jump to navigationJump to searchm |
m |
||
Line 1: | Line 1: | ||
{{Infobox manual/Header}} | {{Infobox manual/Header}} | ||
+ | {{Infobox mapping}} | ||
==AddHudIcon== | ==AddHudIcon== | ||
Line 12: | Line 13: | ||
===Input=== | ===Input=== | ||
* player(CFFPlayer) A reference to the player receiving the icon | * player(CFFPlayer) A reference to the player receiving the icon | ||
− | * material(string) the name of a vmt file to serve as the icon | + | * material(string) the name of a vmt file to serve as the icon. This string must end in .vtf--however it is actually looking up a vmt file. This .vmt must be located in FortressForever\materials\vgui\. |
* icon_id(string) a name for this icon (so we can remove it later) | * icon_id(string) a name for this icon (so we can remove it later) | ||
* x(integer) horizontal position | * x(integer) horizontal position | ||
Line 18: | Line 19: | ||
* w(integer) width of the icon | * w(integer) width of the icon | ||
* h(integer) height of the icon | * h(integer) height of the icon | ||
− | * align(integer) x alignment options | + | * align(integer) x alignment options. |
** 0: align to left | ** 0: align to left | ||
** 1: align to right | ** 1: align to right |
Latest revision as of 23:34, 1 May 2010
AddHudIconAdds an icon to a player's screen UsageAddHudIcon(player, material, icon_id, x, y, w, h, align) OutputReturns: nothing Input
Examplelocal player = CastToPlayer( player_entity ) AddHudIcon(player, "minimap.vtf", "mapoverlay", 0, 40, 128, 128, 1 ) |