Difference between revisions of "Lua:AddHudText"

From Fortress Forever Wiki
Jump to navigationJump to search
(New page: {{Infobox manual/Header}} ==AddHudText== Puts a text object on a player's screen. ===Usage=== <pre>AddHudText(player, text_id, text, a, b, c, d)</pre> ===Input=== * player(CFFPlayer) Th...)
 
 
Line 13: Line 13:
 
* a(integer) x position
 
* a(integer) x position
 
* b(integer) y position
 
* b(integer) y position
* c(integer) alignment
+
* c(integer) horizontal alignment
* d(integer) not sure.
+
* d(integer) vertical alignment
  
 
===Output===
 
===Output===

Latest revision as of 20:08, 15 April 2021


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 )