ShowChat
From Multi Theft Auto: Wiki
This function is used to show or hide the player's chat.
Syntax
Click to collapse [-]
ClientRequired Arguments
- show: A boolean value determining whether to show (true) or hide (false) the chat.
Returns
Returns true if the player's chat was shown or hidden successfully, false otherwise.
Click to collapse [-]
ServerRequired Arguments
- thePlayer: The player whose chat is to be hidden or shown.
- show: A boolean value determining whether to show (true) or hide (false) the chat.
Returns
Returns true if the player's chat was shown or hidden successfully, false otherwise.
Example
Click to collapse [-]
ClientThis example toggle's the player's chat when they press the "i" key.
local isChatVisible = true -- let's assume the chat is visible function chat ( key, keyState ) if isChatVisible then -- if it's on showChat ( false ) -- turn it off isChatVisible = false else showChat ( true ) -- if it's off isChatVisible = true -- turn it on end end bindKey ( "i", "down", chat ) -- the player's "i" key will toggle the chat
See Also
- addCommandHandler
- executeCommandHandler
- fromJSON
- getFPSLimit
- getMaxPlayers
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- getVersion
- isGlitchEnabled
- outputChatBox
- outputConsole
- outputDebugString
- outputServerLog
- removeCommandHandler
- setFPSLimit
- setGlitchEnabled
- setMaxPlayers
- setServerPassword
- showChat
- shutdown
- toJSON