GetPlayerName
The player’s name, as they joined.
Names are unique on a server and compared case-insensitively; a registered name (IsPlayerRegistered) belongs to whoever
logs in with its password. nil when no player has the pid.
Syntax
Section titled “Syntax”GetPlayerName(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”string | nil
Example
Section titled “Example”SendClientMessageToAll(COLOUR_SERVER, GetPlayerName(pid) .. " has arrived")-- the other way round, a name (or a fragment of one) to a pid: GetPlayerIdSee also
Section titled “See also”GetPlayerId · GetPlayers · IsPlayerConnected · SetPlayerNameplate · the Players group of the index
