GetLocalPlayer

From GT-MP
Jump to: navigation, search
GetLocalPlayer
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

Gets the handle of the local client.

Syntax

In Javascript
Client-Side Function

API.getLocalPlayer();

NOTE: This function returns data in LocalHandle type.

Usage example(s)

In Javascript
Client-Side Function

var player = API.getLocalPlayer();
API.setEntityPosition(player, new Vector3(0, 0, 0));

References