G.LocalPlayer

From GMod Wiki

Jump to: navigation, search
Function
Syntax LocalPlayer( )
Where is this used?
Description:
Returns the player object of the client the script is running on.
Returns: Player
Part of Library: Global Functions
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.LocalPlayer]G.LocalPlayer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example shows practical uses.
Used onNewerClient.png
Code
LocalPlayer():ChatPrint("You are talking to yourself")
OutputYou are talking to yourself.


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox