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

Function

getPlayerName

Server and clientPlayersIdentical to MTA:SA

Returns the player's nickname.

Syntax

string getPlayerName(player thePlayer)

Arguments

thePlayerplayer
The player.

Returns

The nickname or false.

Example

addEventHandler("onPlayerJoin", root, function()
    outputChatBox(getPlayerName(source) .. " dołączył do gry", root, 0, 255, 0)
end)

See also