ClearChatBox

From Multi Theft Auto: Wiki
Revision as of 18:27, 31 August 2018 by CrosRoad95 (talk | contribs)
Jump to navigation Jump to search

This function clearing chatbox, not console under F8.

Syntax

Click to collapse [-]
Client
bool clearChatBox ()

Returns

Returns true if the player's chat was cleared successfully, false otherwise.

Click to collapse [-]
Server
bool clearChatBox ( [ element clearFor = getRootElement() ])

Required Arguments

  • clearFor : The player whose chat is to be cleared. By default clear for all.

Returns

Returns true if the player's chat was cleared successfully, false otherwise.

Example

Click to collapse [-]
Client

This example removing spam couse by outputChatBox


for i=1,10 do
  outputChatBox( "spam ..." )
end

clearChatBox()
outputChatBox("Chat cleared successfully!")

See Also