CARS is a section in the item placement file introduced in San Andreas. This section is a simplified method to create parked cars. Usually parked cars are created by the scripts, but just as unique stunt jumps they can be written inside plain text or binary IPLs. Since parked car generators are related to savegames a new game must be started before they are applied to the game. It is possible to create parked car generators without starting a new game using CLEO.
CARS is used to place car generators (parked cars) permanently, randomly or limited, around the game world. For this they need a position, a rotation, information about which car should be placed, the car's colors and some additional information.
PosX, PosY, PosZ, Angle, CarID, PrimCol, SecCol, ForceSpawn, Alarm, DoorLock, Unknown1, Unknown2
|PosX, PosY, PosZ
||The real world coordinates of the car as floating point values.
||The angle of the car in radians (degrees/~57.2958).
||The ID number of the car as defined in the IDE or -1 for random car parks (influenced by the |
||A car color defined in the |
carcols.dat file. If it is set to -1 the color will be randomly chosen.
||Vehicles spawn more reliably if this is set to 1.
||The probability of triggering the alarm system (0 - 100).
||The probability that the doors of the vehicle is locked (0 - 100).
CARS is one of the known sections which can be used in binary format inside streaming files. It's format is similar to the plain text format:
4b - FLOAT - Position X
4b - FLOAT - Position Y
4b - FLOAT - Position Z
4b - FLOAT - Angle (Around Z-Axis)
4b - INT32 - Object ID (an index to an vehicle definition)
4b - INT32 - Primary color
4b - INT32 - Secondary color
4b - INT32 - Force spawn (Windows BOOL - see
4b - INT32 - Alarm probability
4b - INT32 - Locked probability
4b - INT32 - Unknown1 (Could be tertiary color)
4b - INT32 - Unknown2 (Could be quarterdeck color)
^ Car generators in save files
^ Creating a parked car generator via scripts.