It is in manual. If you cannot find it, paste this to NotePad and save as html file. (code from manual)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>sys_record, sys_replay</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body link="#000000" vlink="#333333" alink="#666666">
<h2>sys_record(STRING*
name,<span class="unpara">var</span>
mode)</h2>
<h2><span class="TutorialText">
</span> sys_replay(STRING* name) </h2>
Records or replays the user input in a file in the <a href="asavedir.htm">savedir</a> folder.
This can be used for recording or replaying a demo.
<h3>Parameters:</h3>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td valign="top"><span class="param">name</span></td>
<td>name of the file to be recorded or replayed,
or NULL to stop recording or replaying.</td>
</tr>
<tr>
<td valign="top"><span class="param">mode</span></td>
<td><p><b>0</b> - record only keys and mouse buttons (file size ca.
1 kb/sec).<br>
<b>1</b> -
record keys and mouse movements and buttons (ca. 3 kb/sec).<br>
<b>3 </b>- record keys, mouse, and joystick movements and buttons
(ca. 10 kb/sec). </p>
</td>
</tr>
</table>
<h3>Returns:</h3>
>
<span class="param">0</span>
- operation successful, <=
<span class="param">0</span>
- operation failed.
<h3>Speed:</h3>
Medium
<h3>Remarks:</h3>
<ul>
<li> When using <b>sys_record()</b> and <b>sys_replay()</b> during gameplay
for recording a demo, execute a <b>game_save()</b> / <b>game_load()</b> instruction
before for starting the demo from the same position within the level.</li>
<li><span class="tast">[Ctrl-Alt-Esc]</span> stops recording and replaying
(development version only). Setting <a href="record_mode">record_mode</a> to 0 also stops recording
and replaying.</li>
<li> The command line options <b>-rec</b> and <b>-rpl</b> automatically record
or replay all keyboard and mouse input from the beginning to the file <b>tape.rec</b> (development
version only). Joystick movements and buttons are not recorded. This can
be used to reproduce a certain movement sequence for debugging purposes.</li>
<li>During replay, the application will still react on hitting keyboard or
mouse buttons, but not on mouse or joystick movements.</li>
<li>The <a href="atime.htm">time_step</a> and <a href="atime.htm">time_frame</a> variables
are recorded and replayed also for precisely reproducing movements. </li>
</ul>
<h3>Example:</h3>
<pre><em>// Record a demo from the current position</em><i>
</i>game_save("record",0,SV_ALL-SV_INFO);
wait(1);
sys_record("record.rec",1);
...
game_load("record",0);
wait(1);
sys_replay("record.rec");</pre>
<h3>See also:</h3>
<A href="asave.htm">
<span class="links">game_save</span></A>, <a href="asavedir.htm"></a><A href="aload.htm"><span
class="links">game_load</span></A>, <a href="asavedir.htm">savedir</a>,<span class="TutorialText">
</span> <a href="record_mode.htm">record_mode</a>
</body>
</html>