Difference between revisions of "Engine.GetLocalPlayer"

From GTA Connected
Jump to navigation Jump to search
(Created page with " This function returns the local player instance. == Syntax == <pre>Engine.GetLocalPlayer()</pre> OOP: <pre>client:GetPlayer()</pre> == Return value == This function re...")
(No difference)

Revision as of 13:42, 18 December 2016


This function returns the local player instance.

Syntax

Engine.GetLocalPlayer()

OOP:

client:GetPlayer()

Return value

This function returns this values:

  • playerInstance - Whenever the player instance has been found ('ie: the one who called this from a command is a player')
  • false - Whenever the player instance has not been found ('ie: who executed the command was not a player')

Example

In this example, we create a simple command to message who writes the command.

"NYI"