Lua:SmartMessage

From Fortress Forever Wiki
Jump to navigationJump to search


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")