Engine.OutputChatBox

From Tomb Raider Mod Launcher Wiki
Revision as of 20:11, 15 August 2014 by Jack9267 (talk | contribs) (Created page with "== Function == <syntaxhighlight lang="javascript"> function Engine.OutputChatBox(message[, specificPlayer = null]); </syntaxhighlight> === Arguments === * message ** The me...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function

function Engine.OutputChatBox(message[, specificPlayer = null]);

Arguments

  • message
    • The message to output.

Optional Arguments

  • specificPlayer
    • The player to show the message to, not specifying this argument makes the message output to everyone.

Description

This function will output the message specified to the chatbox.

Example

// Output: "Hello world!" to everyone.
//
Engine.OutputChatBox("Hello world!");

// Output: "Hello" to the player using the command "hello".
//
Engine.AddCommandHandler("hello",function(player, commandLine, command, arguments){
	Engine.OutputChatBox("Hello",player);
});

Notes

  • If you don't specify the second argument the message is outputted to every player that is online.
  • Any message outputted will appear in the server logs even if its only to one player.