StartRecordingPlayback

From NPC for VCMP 0.4 Servers
Revision as of 09:56, 28 February 2024 by 127.0.0.1 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The parameter flags was added in v1.8 and will not work in previous versions.


Description:
This will run a .rec file which has to be saved in the npcscripts/recordings folder. The NPC will follow the actions recorded in the file.


Parameters:

(playbacktype, recordname, flags=0)

playbacktype : The type of the recording to be loaded
recordname : The name of the .rec file (without extension) to run.
flags : The options playback flags for overriding various data in rec file


Return Values:
True on success and null on failure ( file not found or header different version )


Example

function OnNPCEnterVehicle(vehicleid, seatid)
{
	print("I entered vehicle "+vehicleid+" and my seat is "+seatid+"\n");
	StartRecordingPlayback(2,"stretch");
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.