Difference between revisions of "Lua:SmartMessage"

From Fortress Forever Wiki
Jump to navigationJump to search
(New page: {{Infobox manual/Header}} ==SmartMessage== Displays one text message for a specified player, another for that player's teammates, and another for the other team(s). ===Usage=== <pre>Smar...)
 
m (2.4 update)
 
Line 2: Line 2:
 
==SmartMessage==
 
==SmartMessage==
  
Displays one text message for a specified player, another for that player's teammates, and another for the other team(s).
+
Displays one text message for a specified player, another for that player's teammates, and another for the other team(s). You can also specify colors for each message.
  
 
===Usage===
 
===Usage===
<pre>SmartMessage(player, playermessage, teammessage, otherteammessage)</pre>
+
<pre>SmartMessage(player, playermessage, teammessage, otherteammessage)
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorid, colorid )
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorid, colorstring )
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorstring, colorid )
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorid, colorid )
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorstring, colorstring )
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorid, colorstring )
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorstring, colorid )
 +
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorstring, colorstring )</pre>
  
 
===Input===
 
===Input===
Line 12: Line 20:
 
* teammessage(string) message for the player's team
 
* teammessage(string) message for the player's team
 
* otherteammessage(string) message for the other team(s)
 
* otherteammessage(string) message for the other team(s)
 +
* colorid(int) preset colors. See [[Lua:Flags#Color]]
 +
* colorstring(string) An RGB color string, e.g. "255 255 255"
  
 
Type in your own message, or use an entry from resource\FortressForever_english.txt
 
Type in your own message, or use an entry from resource\FortressForever_english.txt

Latest revision as of 00:39, 16 February 2010


SmartMessage

Displays one text message for a specified player, another for that player's teammates, and another for the other team(s). You can also specify colors for each message.

Usage

SmartMessage(player, playermessage, teammessage, otherteammessage)
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorid, colorid )
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorid, colorstring )
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorstring, colorid )
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorid, colorid )
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorid, colorstring, colorstring )
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorid, colorstring )
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorstring, colorid )
SmartMessage( player, "playermessage", "teammessage", "otherteamsmessage", colorstring, colorstring, colorstring )

Input

  • player(CFFPlayer) A player (such as the one who just grabbed a flag)
  • playermessage(string) message for the player
  • teammessage(string) message for the player's team
  • otherteammessage(string) message for the other team(s)
  • colorid(int) preset colors. See Lua:Flags#Color
  • colorstring(string) An RGB color string, e.g. "255 255 255"

Type in your own message, or use an entry from resource\FortressForever_english.txt

Output

Returns nothing

Example

SmartMessage(player, "#FF_YOUDROP", "#FF_TEAMDROP", "#FF_OTHERTEAMDROP")