This site has been archived and made available for preservation purposes. No edits can be made.
GetName
(Difference between revisions)
Return to 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>