-1 car color

Started by rww, Apr 19, 2015, 11:31 AM

Previous topic - Next topic

rww

Is possible to do working color -1 like on 0.3 (choosing car colors from carcols.dat). If yes, where I must put carcols.dat?
Join to Irrelevant Club Discord: https://discord.gg/MsPPZ5uV4X

rObInX

I think you define the colour in server settings.

.

I'm not sure what you mean by "working color -1" :-\ AFAIK colors are in an RGB format with the three components (I.e Red, Green, Blue) which take an intensity value ranging from 0 to 255. I'm not sure what you really mean by that -1.
.

Gulk

carcols is not used for vcmp, instead its

CreateVehicle(193,0,497.6,-87.7,9.5,6.02138592,1,1);//FREEWAY @ MALIBU
                                                                             ^1,1 = the colours

add in main.nut under function onServerStart()

what color is -1 supposed to be? i tired it and it shows white :S

Sebastian

Quote from: Gulk on Apr 20, 2015, 12:18 PMwhat color is -1 supposed to be? i tired it and it shows white :S

it is a random color xD
unfortunately, it starts with 0 and just moves one to 1,2,3,etc. (as I remember)

Anyway, just explode the car and you will see that it has a brand new color.

DizzasTeR

Are you kidding me?

http://wiki.vc-mp.org/wiki/Car_Colors

Those are the supported colors with their respective IDs you can set them by using commands or whatever. If you want to do a random color then use a random function on a array having all the valid color IDs.

Quote from: sseebbyy on Apr 20, 2015, 12:28 PMAnyway, just explode the car and you will see that it has a brand new color.

lal.

Sebastian

If you will write -1 instead of a specified color, you will get just random colors.
I believe this is used in singleplayer too.