14.03.2014, 09:38
Introduction
This is just a simple include which allows you to get 2 random matching colors of a vehicle (based on carcols.dat). Originally, you could use "-1" as the color, but it's very glitchy.
It took about an hour to fetch all of the data from "carcols.dat". Then, I had to sort each entry in the array!
Purpose
In default GTA:SA, vehicles are spawned around the map and given random colors, based on the vehicle's model. To replicate this in SA-MP, you could use "-1" as the color parameter, but it's glitchy (the colors change when you enter and exit interiors). This include fixes that!
Functions
Currently, there is only one function:
For example, to get 2 random colors for the "Infernus" vehicle:
Download
http://pastebin.com/TEE9DKJ1
This is just a simple include which allows you to get 2 random matching colors of a vehicle (based on carcols.dat). Originally, you could use "-1" as the color, but it's very glitchy.
It took about an hour to fetch all of the data from "carcols.dat". Then, I had to sort each entry in the array!
Purpose
In default GTA:SA, vehicles are spawned around the map and given random colors, based on the vehicle's model. To replicate this in SA-MP, you could use "-1" as the color parameter, but it's glitchy (the colors change when you enter and exit interiors). This include fixes that!
Functions
Currently, there is only one function:
pawn Код:
forward GetRandomModelColors(modelid, &color1, &color2);
pawn Код:
new
color1,
color2;
GetRandomModelColors(411, color1, color2);
ChangeVehicleColor(vehicleid, color1, color2);
http://pastebin.com/TEE9DKJ1