Difference between revisions of "Players::local"

From RAGE Multiplayer Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
{{ClientsideJsFunction}}
 
{{ClientsideJsFunction}}
  
Returns object of player. On client-side - current playing player, on server-side, maybe, first player.
+
Returns local player object of the given client-side environment.
  
 
{{JSContainer|
 
{{JSContainer|

Latest revision as of 14:46, 1 December 2019

Client-Side
Function

Js.png JavaScript



Returns local player object of the given client-side environment.

JavaScript Syntax
Jslogo.png

Syntax

mp.players.local

Example

  const localPlayer = mp.players.local;
  localPlayer.freezePosition(true);