ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setAccountName

Function

setAccountName

ServerAccountsIdentical to MTA:SA

Renames an account, moving all its data.

Syntax

bool setAccountName(account theAccount, string name [, bool allowCaseVariations = false])

Arguments

theAccountaccount
The account.
namestring
The new name.
allowCaseVariationsbool, optional = false
Allows a name that differs only in letter case from an existing one.

Returns

true on success.

Example

setAccountName(getAccount("jan"), "JanKowalski")

See also