SetChatboxCharacterLimit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Initial contents)
 
m (Add counterpart)
 
Line 10: Line 10:
bool setChatboxCharacterLimit(int charLimit)
bool setChatboxCharacterLimit(int charLimit)
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[GUI widgets|GuiElement]].setChatboxCharacterLimit|chatboxCharacterLimit|}}
{{OOP||[[GUI widgets|GuiElement]].setChatboxCharacterLimit|chatboxCharacterLimit|getChatboxCharacterLimit}}


===Required Arguments===  
===Required Arguments===  

Latest revision as of 22:40, 25 December 2022

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

Syntax

bool setChatboxCharacterLimit(int charLimit)

OOP Syntax Help! I don't understand this!

Method: GuiElement.setChatboxCharacterLimit(...)
Variable: .chatboxCharacterLimit
Counterpart: getChatboxCharacterLimit


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

Example

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

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI