- Documentation
- Chat and console
Category
Chat and console
All Lua functions and events in the Chat and console category, on the server and the client.
Server functions 1
Client functions 1
Shared functions 7
clearClears the chat box. On the server it clears the chat for one player or, with no argument, for everyone.Chat Box isChecks whether the chat box is visible. On the server you pass the player.Chat Visible outputWrites a message in chat. On the server to one player or everyone, on the client in the local player's chat.Chat Box outputPrints a line in the F8 console. On the server, with no target the line goes to every player.Console outputAdds an entry to the debug log (Debug String /debugscript). Levels 1-3 add the script file and line.printPrints text to the chosen console. The first argument is a required category that says where the text goes. The remaining values are converted to text and joined with two spaces.showShows or hides the chat box. On the server you pass a player (orChat rootfor everyone).
Server events 6
onA message is going to chat (from a player or a script). You can hold it back.Chat Message onSomeone typed text in a console: a player in the game console (F8) or an admin in the server console.Console onA debug message appeared (an error, a warning orDebug Message outputDebugString). Useful for collecting script errors in one place.onA player wrote a chat message (a normal one orPlayer Chat /me). You can block it, e.g. to send your own formatted one.onA player typed a command (beforePlayer Command addCommandHandlerruns it). You can block it.onA player sent a private message to another player.Player Private Message