StartRecordingPlayerData
From SA-MP Wiki
StartRecordingPlayerData
Warning: This function was added in SA-MP version 0.3. It is not available in previous versions.
Starts recording the player's movements to a file, which can then be reproduced by an NPC.
(playerid, recordtype, recordname[])
| playerid | The ID of the player you want to record. |
| recordtype | The 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. |
This function does not return a specific value.
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 might be useful as well, as they're related to this function in one way or another.
