setChatboxCharacterLimit | Multi Theft Auto: Wiki Skip to content

setChatboxCharacterLimit

Client-side
Server-side
Shared

Pair: getChatboxCharacterLimit

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


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

OOP Syntax Help! I don't understand this!

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

Syntax

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

Returns

  • bool: value

Returns true if the character limit was set, false otherwise

Code Examples

shared

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