warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
StartRecordingPlayerData
Description
Starts recording a player's movements to a file, which can then be reproduced by an NPC.
Name | Description |
---|---|
playerid | The ID of the player to record. |
PLAYER_RECORDING_TYPE:recordType | The type of recording. |
const recordFile[] | 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. |
Returns
This function does not return any specific values.
Examples
if (!strcmp("/recordme", cmdtext))
{
if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_ONFOOT, "MyFile");
}
else if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
StartRecordingPlayerData(playerid, PLAYER_RECORDING_TYPE_DRIVER, "MyFile");
}
SendClientMessage(playerid, 0xFFFFFFFF, "All your movements are now being recorded!");
return 1;
}
Related Functions
- StopRecordingPlayerData: Stops recording player data.