Players::local: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
mNo edit summary
 
Line 1: Line 1:
{{ClientsideJsFunction}}
{{ClientsideJsFunction}}


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


{{JSContainer|
{{JSContainer|
Line 8: Line 8:


== Example ==
== Example ==
{{ClientsideCode|
<pre>
<pre>
   const localPlayer = mp.players.local;
   const localPlayer = mp.players.local;
Line 13: Line 14:
</pre>
</pre>
}}
}}
}}
==See also==
{{Player_function_c}}
[[Category:Clientside API]]

Latest revision as of 22:21, 20 April 2020

Client-Side
Function

 JavaScript



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

JavaScript Syntax

Syntax

mp.players.local

Example

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


See also