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

Function

getPlayerSerial

ServerPlayersIdentical to MTA:SA

Returns the player's Client ID: a stable device identifier that cannot be forged. Use it for bans and linking accounts.

Syntax

string getPlayerSerial(player thePlayer)

Arguments

thePlayerplayer
The player.

Returns

Client ID or false.

Example

addEventHandler("onPlayerJoin", root, function()
    outputServerLog(getPlayerName(source) .. " ID: " .. getPlayerSerial(source))
end)

See also