This site has been archived and made available for preservation purposes. No edits can be made.

GetName

This is an old revision of this page, as edited 04-06-2012, 03:24 PM by foxtacles (contribs). It may differ significantly from the current revision.
Retrieves the name of an Object.

[top]Declaration

<code cpp>
VAULTSCRIPT std::string (*GetName)(vaultmp::ID);
native GetName(ID, name{});
</code>

[top]Parameters

vaultmp::ID - the ID of the Object
name (PAWN only) - an array large enough to hold at least MAX_PLAYER_NAME characters. Note that Objects which are not Players can have longer names.

[top]Return value

The C++ version returns a std::string containing the name. The PAWN version has no return value.

[top]Usage example (C++)

<code cpp>
std::string name;
name = GetName(object);
</code>

[top]Usage example (PAWN)

<code c>
new name{MAX_PLAYER_NAME};
GetName(player, name);
</code>