Carrec

The  file stores a set of R3 files (files with an extension  ). These files contain path information used by the mission script for Grand Theft Auto: San Andreas and Grand Theft Auto IV. The paths are predefined and look unnatural during gameplay because the movement of the vehicle is very rigid. The paths ignore many stuff in the game including gravity and obstacles.

Original San Andreas installation has 426 R3 paths. Maximum number of these paths is 475. GTA IV increases this limit. By default there are 1813 R3 paths. The limit appears to be located somewhere beyond 3000.

GTA IV does not use an image to store the carrec paths. They are located in the directory ...\common\data\paths\.

The RRR file structure
Each RRR file contains no header, only a binary data, being a set of structures of 32 bytes in length each, described separate path points. The data in a path point structure goes as the following:

When the vehicle is moving along the path, its XYZ structure is filled with the information from the proper fields of checkpoint data.

San Andreas
You can use the following opcodes to do stuff to your paths.

07C0 - Loads the path

07C1 - Checks if the path has been loaded

0873 - Releases the path from memory

05EB - Assigns a vehicle to the path

0705 - Assigns a vehicle to the path

085E - Assigns a vehicle to a looped path

05EC - Releases the vehicle from a path

05ED - Freezes the vehicle along the path

05EE - Unfreezes the vehicle along the path

06FD - Sets the speed multiplier of the vehicle along the path

0706 - Advances the vehicle along the path

060E - Checks if a path is assigned to the vehicle

If you load a non-existent path to a vehicle, path 1 will be loaded instead.

GTA 4
Use the following native functions:

REQUEST CAR RECORDING

HAS CAR RECORDING BEEN LOADED

REMOVE CAR RECORDING

FIND POSITION IN RECORDING

FIND TIME POSITION IN RECORDING

GET POSITION OF CAR RECORDING AT TIME

GET TOTAL DURATION OF CAR RECORDING

SET RECORDING TO POINT NEAREST TO COORS

SYNCH RECORDING WITH WATER

List of paths in San Andreas
The following is a list of paths defined in the  file.

More to come soon. The last ID is 834.