Recorder::start: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Starts recording a replay.<br> If mode is 0, turns on action replay.<br> If mode is 1, starts recording.<br> If already recording a replay, does nothing.<br> ==Syntax== <synta...")
 
m (Replaced HTML with template)
 
Line 3: Line 3:
If mode is 1, starts recording.<br>
If mode is 1, starts recording.<br>
If already recording a replay, does nothing.<br>
If already recording a replay, does nothing.<br>
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.recorder.start(mode);</syntaxhighlight>
<pre>
mp.game.recorder.start(mode);
</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''mode:''' Number: recording mode
*'''mode:''' Number: recording mode
===Return value===
===Return value===
Unknown
Unknown
==Example==
==Example==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ClientsideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Client-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
mp.keys.bind(0x72, false, () => { // F3
mp.keys.bind(0x72, false, () => { // F3
   if (!mp.game.recorder.isRecording()) {
   if (!mp.game.recorder.isRecording()) {
Line 20: Line 25:
   }
   }
});
});
</syntaxhighlight>
</pre>
</div>
}}


==See also==
==See also==

Latest revision as of 12:52, 26 October 2018

Starts recording a replay.
If mode is 0, turns on action replay.
If mode is 1, starts recording.
If already recording a replay, does nothing.

Syntax

mp.game.recorder.start(mode);

Required Arguments

  • mode: Number: recording mode

Return value

Unknown

Example

Client-Side
mp.keys.bind(0x72, false, () => { // F3
  if (!mp.game.recorder.isRecording()) {
    mp.game.recorder.start(1);
  } else {
    mp.game.recorder.stop();
  }
});

See also