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-26-2012, 09:54 PM by foxtacles (contribs). It may differ significantly from the current revision.
Retrieves the name of an Object.

[top]Declaration

Code cpp:
VAULTSCRIPT vaultmp::String (*GetName)(vaultmp::ID);
native GetName(ID, name{});

[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 vaultmp::String containing the name. The PAWN version has no return value.

[top]Usage example (C++)

Code cpp:
vaultmp::String name;
name = GetName(object);

[top]Usage example (PAWN)

Code c:
new name{MAX_PLAYER_NAME};
GetName(player, name);