Mobile::cellCamActivate: 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}}
Enables the camera view from your phone
'''NOTE:''' This does not enable taking photos, this is only the VIEW.


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mobile.cellCamActivate(p0, p1);</syntaxhighlight>
<pre>mp.game.mobile.cellCamActivate(enable, p1);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''p0:''' Boolean
*'''enable:''' {{RageType|Boolean}}
*'''p1:''' Boolean
*'''p1:''' {{RageType|Boolean}}
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
Up arrow to enable the camera, down arrow to disable the camera
todo
{{ClientsideCode|
</syntaxhighlight>
<pre>
mp.keys.bind(0x28, true, function() {  // Down Arrow
    mp.game.mobile.cellCamActivate(false, false);
});
 
mp.keys.bind(0x26, true, function() {  // Up Arrow
    mp.game.mobile.cellCamActivate(true, true);
});
</pre>
}}
==See also==
==See also==
{{Mobile_function_c}}
{{Mobile_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:Mobile API]]

Latest revision as of 00:21, 23 January 2019

Client-Side
Function

 JavaScript



Enables the camera view from your phone

NOTE: This does not enable taking photos, this is only the VIEW.

Syntax

mp.game.mobile.cellCamActivate(enable, p1);

Required Arguments

  • enable: Boolean
  • p1: Boolean

Return value

  • Undefined

Example

Up arrow to enable the camera, down arrow to disable the camera

Client-Side
mp.keys.bind(0x28, true, function() {   // Down Arrow
    mp.game.mobile.cellCamActivate(false, false);
});

mp.keys.bind(0x26, true, function() {   // Up Arrow
    mp.game.mobile.cellCamActivate(true, true);
});

See also