ClearChatBox: Difference between revisions
Jump to navigation
Jump to search
CrosRoad95 (talk | contribs) No edit summary |
m (Few English fixes) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
{{New feature/item|3.0156|1.5.6|14198|This function | {{New feature/item|3.0156|1.5.6|14198|This function clears the chatbox. It does not clear the console (F8)}} | ||
==Syntax== | ==Syntax== | ||
Line 17: | Line 17: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''clearFor :''' The [[player]] whose chat is to be cleared. By default | *'''clearFor :''' The [[player]] whose chat is to be cleared. By default, this is set to the root element, which will affect all players. | ||
===Returns=== | ===Returns=== | ||
Line 25: | Line 25: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
This example | This example removes spam caused by outputChatBox | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Revision as of 18:36, 31 August 2018
This function clears the chatbox. It does not clear the console (F8)
Syntax
Click to collapse [-]
Clientbool clearChatBox ()
Returns
Returns true if the player's chat was cleared successfully, false otherwise.
Click to collapse [-]
Serverbool clearChatBox ( [ element clearFor = getRootElement() ])
Required Arguments
- clearFor : The player whose chat is to be cleared. By default, this is set to the root element, which will affect all players.
Returns
Returns true if the player's chat was cleared successfully, false otherwise.
Example
Click to collapse [-]
ClientThis example removes spam caused by outputChatBox
for i=1,10 do outputChatBox( "spam ..." ) end clearChatBox() outputChatBox("Chat cleared successfully!")
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown