Warcraft 3 documentation
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation
This topic is the discussión abut the function GetPlayerName. You can see all the information about this function keyword HERE.

[functions] GetPlayerName No New Posts Jassdoc

Started by
City17

0 Members and 1 Guest are viewing this topic.

[functions] GetPlayerName
on: April 07, 2022, 05:46:51 PM

returns the player name.

Example:
Code: Lua
  1. -- assuming you play as player Red
  2. 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)
Example:
Code: Lua
  1. local me = GetPlayerName( Player(0) ) --> your player name as text
  2. local np = GetPlayerName( Player(PLAYER_NEUTRAL_PASSIVE) ) --> "Player 28"
« Last Edit: April 07, 2022, 06:09:55 PM by City17 »



 

Started by moyack

Replies: 3
Views: 3637
Jassdoc

Started by Jedi

Replies: 5
Views: 14206
General Jass Discussion

Started by moyack

Replies: 40
Views: 56809
Jass Theory & Questions

Started by moyack

Replies: 0
Views: 261
Jassdoc

Started by moyack

Replies: 0
Views: 265
Jassdoc
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...