StartRecordingPlayerData

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 17:23, 16 March 2012
Mauzen (Talk | contribs)

← Previous diff
Revision as of 17:31, 4 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 1: Line 1:
{{Scripting}} {{Scripting}}
-{{Title}} 
{{0.3Added|function|}} {{0.3Added|function|}}
Line 29: Line 28:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
 +
 +[[fr:StartRecordingPlayerData]]

Revision as of 17:31, 4 February 2014



StartRecordingPlayerData was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Description:

Starts recording the player's movements to a file, which can then be reproduced by an NPC.


Parameters:
(playerid, recordtype, recordname[])
playeridThe ID of the player you want to record.
recordtypeThe type of recording.
recordname[]Name of the file which will hold the recorded data. It will be saved in scriptfiles, with an automatically added .rec extension.


Return Values:

This function does not return any specific values.


if (!strcmp("/recordme", cmdtext))
{
    if(GetPlayerState(playerid) == 1)
    StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT, "MyFile");
    else if(GetPlayerState(playerid) == 2)
    StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_DRIVER, "MyFile");
    SendClientMessage(playerid, 0xFFFFFFFF, "All your movements are now being recorded!");
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages