setChatboxCharacterLimit | Multi Theft Auto: Wiki Skip to content

setChatboxCharacterLimit

Client-side
Server-side
Shared

Pair: getChatboxCharacterLimit

Sets the maximum amount of characters that can be input via chatbox.

OOP Syntax Help! I don't understand this!

  • Method:GuiElement.setChatboxCharacterLimit(...)
  • Variable: .chatboxCharacterLimit

Syntax

bool setChatboxCharacterLimit ( ​int charLimit )
Required arguments
  • charLimit: An integer between 0-255. Passing -1 will reset the character limit (96).

Returns

Returns true if the character limit was set, false otherwise

  • bool: result

Code Examples

client

This example shows how you can set the character limit to maximum when a player joins the server (assuming this resource is running when they join).

addEventHandler("onClientResourceStart", resourceRoot, function()
setChatboxCharacterLimit(255)
end)

See Also

GUI Functions