Lua:AddHudText

From Fortress Forever Wiki
Jump to navigationJump to search


AddHudText

Puts a text object on a player's screen.

Usage

AddHudText(player, text_id, text, a, b, c, d)

Input

  • player(CFFPlayer) The player receiving the text
  • text_id(string) the name of this text (so we can remove it later)
  • text(string) The text to display
  • a(integer) x position
  • b(integer) y position
  • c(integer) horizontal alignment
  • d(integer) vertical alignment

Output

Returns: nothing

Example

local player = CastToPlayer( player_entity )
AddHudText( player, "hunted_location", "Hunted Location: " .. player_hunted:GetLocation(), 4, 44, 0, 1 )