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

Function

getAccountSerial

ServerAccountsIdentical to MTA:SA

Returns the Client ID remembered when logging into this account.

Syntax

string getAccountSerial(account theAccount)

Arguments

theAccountaccount
The account.

Returns

Client ID or false.

Example

addEventHandler("onPlayerLogin", root, function(_, account)
    local known = getAccountSerial(account)
    if known and known ~= getPlayerSerial(source) then
        outputChatBox("Logujesz się z nowego urządzenia.", source, 255, 200, 0)
    end
    setAccountSerial(account, getPlayerSerial(source))
end)

See also