Garry's Mod Wiki

LocalPlayer

  Player LocalPlayer()

Description

Returns the player object of the current client.

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

Returns

1 Player
The player object representing the client.

Example

Demonstrates the use of this function.

Output: Player [1][Player1]