Difference between revisions of "Lua:BroadCastMessageToPlayer"

From Fortress Forever Wiki
Jump to navigationJump to search
(New page: {{Infobox manual/Header}} ==BroadCastMessageToPlayer== Sends a text message to a single player. Is it still broadcasting if it only goes to one person? Who came up with this crap? ===Usa...)
 
m
 
Line 5: Line 5:
  
 
===Usage===
 
===Usage===
<pre>BroadCastMessageToPlayer( player, message )</pre>
+
<pre>
 +
BroadCastMessageToPlayer( player, message, duration )
 +
BroadCastMessageToPlayer( player, message, duration, colorid )
 +
BroadCastMessageToPlayer( player, message, duration, colorstring )</pre>
  
 
===Input===
 
===Input===
 
* player(CFFPlayer) The player to receive the message.
 
* player(CFFPlayer) The player to receive the message.
 
* message(string) the message to display. Type in your own message, or use an entry from resource\FortressForever_english.txt.
 
* message(string) the message to display. Type in your own message, or use an entry from resource\FortressForever_english.txt.
 +
* duration(int) number of seconds to display
 +
* colorid(int) preset colors. See [[Lua:Flags#Color]]
 +
* colorstring(string) An RGB color string, e.g. "255 255 255"
  
 
===Output===
 
===Output===
Line 15: Line 21:
  
 
===Example===
 
===Example===
<pre>BroadCastMessageToPlayer( player, "#FF_NOTALLOWEDDOOR" )</pre>
+
<pre>BroadCastMessageToPlayer( player, "#FF_NOTALLOWEDDOOR", 5, "255, 0, 0")</pre>
  
 
[[Category:Lua_Commands]]
 
[[Category:Lua_Commands]]
 
[[Category:Messages]]
 
[[Category:Messages]]
 
{{Infobox manual/Footer}}
 
{{Infobox manual/Footer}}

Latest revision as of 23:36, 15 February 2010


BroadCastMessageToPlayer

Sends a text message to a single player. Is it still broadcasting if it only goes to one person? Who came up with this crap?

Usage

BroadCastMessageToPlayer( player, message, duration )
BroadCastMessageToPlayer( player, message, duration, colorid )
BroadCastMessageToPlayer( player, message, duration, colorstring )

Input

  • player(CFFPlayer) The player to receive the message.
  • message(string) the message to display. Type in your own message, or use an entry from resource\FortressForever_english.txt.
  • duration(int) number of seconds to display
  • colorid(int) preset colors. See Lua:Flags#Color
  • colorstring(string) An RGB color string, e.g. "255 255 255"

Output

Returns nothing

Example

BroadCastMessageToPlayer( player, "#FF_NOTALLOWEDDOOR", 5, "255, 0, 0")