Difference between revisions of "GetEntityName"

From Nomad DB
(Created page with "This function returns the name of the specified entity. == Syntax == <pre> GetEntityName(entityId) </pre> * '''entityId''': ID of the target entity. * '''Returns''': Name of...")
 
Line 2: Line 2:
  
 
== Syntax ==
 
== Syntax ==
<pre>
+
<syntaxhighlight lang="lua">
 
GetEntityName(entityId)
 
GetEntityName(entityId)
</pre>
+
</syntaxhighlight>
* '''entityId''': ID of the target entity.
+
* '''entityId''' (string): ID of the target entity.
* '''Returns''': Name of the specified entity.
+
* '''Returns''' (string): Name of the specified entity.
  
 
== Example ==
 
== Example ==
<pre>
+
<syntaxhighlight lang="lua">
 
local entityName = GetEntityName(GetLocalPlayerEntityId())
 
local entityName = GetEntityName(GetLocalPlayerEntityId())
 
print(entityName) -- returns "player.MainCharacter.PawnPlayer.Aiden2"
 
print(entityName) -- returns "player.MainCharacter.PawnPlayer.Aiden2"
</pre>
+
</syntaxhighlight>
  
 
== Related Pages ==
 
== Related Pages ==

Revision as of 18:57, 14 April 2020

This function returns the name of the specified entity.

Syntax

GetEntityName(entityId)
  • entityId (string): ID of the target entity.
  • Returns (string): Name of the specified entity.

Example

local entityName = GetEntityName(GetLocalPlayerEntityId())
print(entityName) -- returns "player.MainCharacter.PawnPlayer.Aiden2"

Related Pages