Returns the player name.
-- assuming you play as player Red local 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 text local np = GetPlayerName( Player(PLAYER_NEUTRAL_PASSIVE) ) --> "Player 28"
- return type
- Source code
native GetPlayerName takes player whichPlayer returns string