Returns the player name.
Example (Lua):
-- assuming you play as player Redlocal name = GetPlayerName(Player(0)) --> your player name as text Copy
-- assuming you play as player Redlocal name = GetPlayerName(Player(0)) --> your player name as text
If the player is not present in the game or is one of the internal players, returns localized string + one-based player number (WorldEdit-like):
local me = GetPlayerName( Player(0) ) --> your player name as textlocal np = GetPlayerName( Player(PLAYER_NEUTRAL_PASSIVE) ) --> "Player 28" Copy
local me = GetPlayerName( Player(0) ) --> your player name as textlocal np = GetPlayerName( Player(PLAYER_NEUTRAL_PASSIVE) ) --> "Player 28"
Generated using TypeDoc
Returns the player name.
Example (Lua):
If the player is not present in the game or is one of the internal players, returns localized string + one-based player number (WorldEdit-like):