Garry's Mod Wiki

Garry's Mod Wiki

  string Player:GetName()

Description

Returns the player's name, this is an alias of Player:Nick.

This function overrides Entity:GetName (in the Lua metatable, not in c++), keep it in mind when dealing with ents.FindByName or any engine function which requires the mapping name.

Returns

1 string
The player's name.

Example

Prints the player's name

print( Entity( 1 ):GetName() )
Output: Player1

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...