This is an old revision of this page, as edited 09-28-2011, 06:11 PM by . It may differ significantly from the
current revision.
Retrieves the name of an [[Object]].
== Declaration ==
<code cpp>
VAULTSCRIPT std::string (*GetName)(vaultmp::ID);
native GetName(ID, name{});
</code>
== Parameters ==
'''[[ID|vaultmp::ID]]''' - the ID of the Object
'''name''' - an array large enough to hold [[MAX_PLAYER_NAME]] characters (PAWN only)
== Return value ==
The C++ version returns a std::string containing the name. The PAWN version has no return value.
== Usage example (C++) ==
<code cpp>
std::string name;
name = GetName(object);
</code>
== Usage example (PAWN) ==
<code c>
new name{MAX_PLAYER_NAME};
GetName(object, name);
</code>