StartRecordingPlayerData
From SA-MP Wiki
Description:
Starts recording a player's movements to a file, which can then be reproduced by an NPC.
(playerid, recordtype, recordname[])
playerid | The ID of the player to record. |
recordtype | The type of recording. |
recordname[] | The name of the file which will hold the recorded data. It will be saved in the scriptfiles directory, with an automatically added .rec extension, you will need to move the file to npcmodes/recordings to use for playback. |
Return Values:
- 1: The function was executed successfully.
- 0: The function failed to execute. This means the player specified does not exist.
Example Usage:
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; }
[edit]
Related Functions
The following functions may be helpful as they relate to this function in one way or another.
- StopRecordingPlayerData: Stops recording player data.