ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. gettok

Function

gettok

Server and clientMiscellaneousIdentical to MTA:SA

Returns one part of the text (counted from 1), split the same way as in split.

Syntax

string gettok(string input, int token, string|int separator)

Arguments

inputstring
The text.
tokenint
Part number from 1.
separatorstring|int
A separator or a character code.

Returns

The part or false if there is none.

Example

outputServerLog(gettok("Jan Kowalski 25", 2, " ")) -- Kowalski

See also