Mobile::getMobilePhonePosition: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{ClientsideJsFunction}}
Returns the position of the phone created.


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.mobile.getMobilePhonePosition(position);</syntaxhighlight>
<pre>mp.game.mobile.getMobilePhonePosition(position);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''position:''' Vector3
*'''position:''' {{RageType|Vector3}}
 
===Return value===
===Return value===
*'''Vector3'''
*'''Object'''
 
==Example==
==Example==
<syntaxhighlight lang="javascript">
{{ClientsideCode|
// todo
<pre>
</syntaxhighlight>
mp.keys.bind(0x77, true, function() {  // F8
    let mpos = mp.game.mobile.getMobilePhonePosition(new mp.Vector3(0,0,0));
    mp.gui.chat.push(`Mobile Pos: ${JSON.stringify(mpos)}`);
});
</pre>
}}
==See also==
==See also==
{{Mobile_s_function_c}}
{{Mobile_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:Mobile API]]

Latest revision as of 00:26, 23 January 2019

Client-Side
Function

 JavaScript



Returns the position of the phone created.

Syntax

mp.game.mobile.getMobilePhonePosition(position);

Required Arguments

  • position: Vector3

Return value

  • Object

Example

Client-Side
mp.keys.bind(0x77, true, function() {   // F8
    let mpos = mp.game.mobile.getMobilePhonePosition(new mp.Vector3(0,0,0));
    mp.gui.chat.push(`Mobile Pos: ${JSON.stringify(mpos)}`);
});

See also