ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. guiEditSetCaretIndex

Function

guiEditSetCaretIndex

ClientInterface (GUI)Identical to MTA:SA

Sets the text cursor position in a field.

Syntax

bool guiEditSetCaretIndex(element theElement, int index)

Arguments

theElementelement
The text field.
indexint
Position.

Returns

true on success.

Example

guiSetText(edit, "/pw ")
guiEditSetCaretIndex(edit, 4)