ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getLocalPlayer

Function

getLocalPlayer

Server and clientPlayersIdentical to MTA:SA

Returns the player whose computer runs the script. The localPlayer variable gives the same. On the server it returns false.

Syntax

player getLocalPlayer()

Returns

The local player.

Example

local me = getLocalPlayer()
outputChatBox("Grasz jako " .. getPlayerName(me))