Player/Name

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Class function fixes.)
m (Bug)
 
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=Name
+
|Description=Returns the players name. Identical to {{ClassFunction|Player|Nick}} and {{ClassFunction|Player|GetName}}.
|Parent=Player
+
|Description=Returns the players name. Identical to {{ClassFunction|Player|Nick}} and {{ClassFunction|Player|GetName}}
+
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
Line 8: Line 6:
 
{{Ret
 
{{Ret
 
|type=string
 
|type=string
|desc= name
+
|desc=Player's Steam name.
 +
 
 +
{{Bug|Issue=3178|This is limited to 31 characters even though Steam names can have 32.}}
 
}}
 
}}
 
{{Example
 
{{Example
| Description = Prints the players name in console.
+
|Description=Prints the players name in console.
| Code = print(Player(1):Name())
+
|Code=print(Player(1):Name())
| Output = YourNameHere
+
|Output=YourNameHere
 
}}
 
}}

Latest revision as of 22:55, 26 July 2018

 Player:Name( )

Contents

Description

Returns the players name. Identical to Player:Nick and Player:GetName.

Returns

string

Player's Steam name.

BUG

This is limited to 31 characters even though Steam names can have 32.

Issue Tracker: #3178

Examples

Example

Prints the players name in console.

print(Player(1):Name())

Output:

YourNameHere
Personal tools
Navigation