LocalPlayer

From Garry's Mod
Jump to: navigation, search
 LocalPlayer( )

Contents

Description

Returns the player object of the current client.

LocalPlayer() will return NULL until all entities have been initialized. See GM:InitPostEntity.

Returns

Player

The player object representing the client.

Examples

Example

Demonstrates the use of this function.

print( LocalPlayer() )

Output:

[Player][1][Player1]
Personal tools
Navigation